123456789101112131415161718192021222324252627282930313233343536373839 |
- var t = require;
- var e = module;
- var i = exports;
- Object.defineProperty(i, "__esModule", {value: !0}), (i.ItemBase = void 0);
- const s = t("GameText"),
- o = t("BagConst");
- i.ItemBase = class {
- constructor() {
- this._desc = "";
- }
- setConfData(t) {
- this.data = t;
- }
- getItemPic() {
- return "Texture/itemIcon/" + this.data.itemIcon;
- }
- getName() {
- return s.GameText.getTextByStr(this.data.name);
- }
- getDesc() {
- return s.GameText.getTextByStr(this.data.desc);
- }
- getCnt() {
- return 0;
- }
- getDisplayCnt() {
- return this.getCnt() + "";
- }
- isCostume() {
- return this.data.itemType == o.ItemType.COSTUME && this.data.costume.costumeId;
- }
- use(t = 0) {}
- setMemento(t) {
- this.cnt = t ? t.cnt : 0;
- }
- createMemento() {
- if (this.cnt) return {cnt: this.cnt};
- }
- };
|