camelot-unchained
Version:
Camelot Unchained Client Library
47 lines (37 loc) • 1.76 kB
JavaScript
/**
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var gearSlot_1 = require('../constants/gearSlot');
/**
* Item
*/
var Item = function () {
/**
* Item Constructor
* @param {Item = <Item>{}} item - an existing item to create this new item from
*/
function Item() {
var item = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
_classCallCheck(this, Item);
this.id = item.id || "";
this.name = item.name || "";
this.description = item.description || "";
this.resourceID = item.resourceID;
this.gearSlot = item.gearSlot || gearSlot_1.default.NONE;
}
_createClass(Item, null, [{
key: "create",
value: function create() {
var a = new Item();
return a;
}
}]);
return Item;
}();
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Item;