diff --git a/config/dropitem_tbl.json b/config/dropitem_tbl.json index e69de29..ba55586 100644 --- a/config/dropitem_tbl.json +++ b/config/dropitem_tbl.json @@ -0,0 +1 @@ +[{"id":80001,"parname":"藏宝图碎片1","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80002,"parname":"藏宝图碎片2","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80003,"parname":"藏宝图碎片3","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80004,"parname":"藏宝图碎片4","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80005,"parname":"藏宝图碎片5","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80006,"parname":"藏宝图碎片6","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80007,"parname":"藏宝图碎片7","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80008,"parname":"藏宝图碎片8","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80009,"parname":"藏宝图碎片9","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80010,"parname":"藏宝图碎片10","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80011,"parname":"完整的藏宝图","itemtypeid":1,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80012,"parname":"红钻石","itemtypeid":7,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80013,"parname":"金币","itemtypeid":7,"Price":"","autopen":0,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80014,"parname":"PVP初级胜利掉落","itemtypeid":2,"Price":"","autopen":1,"drop":"80012:20|80013:2000|80024:200","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80015,"parname":"PVP初级失败掉落","itemtypeid":2,"Price":"","autopen":1,"drop":"80012:10|80013:1000|80024:100","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80016,"parname":"藏宝图碎片分包","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80017,"parname":"单抽常规卡包","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80018,"parname":"十连抽常规卡包","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80019,"parname":"常规卡包普通卡","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":3,"candgradeid":2,"additionalcandidates":""},{"id":80020,"parname":"常规卡包稀有卡","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":3,"candgradeid":3,"additionalcandidates":""},{"id":80021,"parname":"常规卡包史诗卡","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":3,"candgradeid":4,"additionalcandidates":""},{"id":80022,"parname":"常规卡包传奇卡","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":3,"candgradeid":5,"additionalcandidates":""},{"id":80023,"parname":"常规卡包稀有卡以上","itemtypeid":2,"Price":"","autopen":1,"drop":"","weight":10000,"candtypeid":0,"candgradeid":0,"additionalcandidates":"80020|80020|80020|80020|80021|80022"},{"id":80024,"parname":"蓝钻石","itemtypeid":7,"Price":"","autopen":0,"drop":"","weight":0,"candtypeid":0,"candgradeid":0,"additionalcandidates":""},{"id":80025,"parname":"神秘的黄金牌","itemtypeid":1,"Price":"80012:200","autopen":0,"drop":"","weight":0,"candtypeid":0,"candgradeid":0,"additionalcandidates":""}] \ No newline at end of file diff --git a/config/itemfunc_tbl.json b/config/itemfunc_tbl.json index 9b209a0..6934d20 100644 --- a/config/itemfunc_tbl.json +++ b/config/itemfunc_tbl.json @@ -1 +1 @@ -[{"id":90001,"parname":"打开单抽常规卡包","consume1":"80024:198","consume2":"","selectiontimes":0,"actypeid":1,"get":"80017:1|80013:100"},{"id":90002,"parname":"打开十连抽常规卡包","consume1":"80011:1","consume2":"80024:1950","selectiontimes":0,"actypeid":1,"get":"80018:1|80013:1000"},{"id":90003,"parname":"刷新随机到的武将","consume1":"80024:50","consume2":"","selectiontimes":0,"actypeid":2,"get":""},{"id":90004,"parname":"合成完整藏宝图","consume1":"80001:1|80002:1|80003:1|80004:1|80005:1|80006:1|80007:1|80008:1|80009:1|80010:1|","consume2":"","selectiontimes":0,"actypeid":1,"get":"80011:1"},{"id":90005,"parname":"兑换蓝钻石","consume1":"80012:1","consume2":"","selectiontimes":1,"actypeid":1,"get":"80024:10"}] \ No newline at end of file +[{"id":90001,"parname":"打开单抽常规卡包","consume1":"80024:198","consume2":"","actypeid":1,"get":"80017:1|80013:100"},{"id":90002,"parname":"打开十连抽常规卡包","consume1":"80011:1","consume2":"80024:1950","actypeid":1,"get":"80018:1|80013:1000"},{"id":90003,"parname":"刷新随机到的武将","consume1":"80024:50","consume2":"","actypeid":2,"get":""},{"id":90004,"parname":"合成完整藏宝图","consume1":"80001:1|80002:1|80003:1|80004:1|80005:1|80006:1|80007:1|80008:1|80009:1|80010:1|","consume2":"","actypeid":1,"get":"80011:1"}] \ No newline at end of file diff --git a/src/cfg/parsers/DropItemCfg.ts b/src/cfg/parsers/DropItemCfg.ts index 12139cc..6bed7ff 100644 --- a/src/cfg/parsers/DropItemCfg.ts +++ b/src/cfg/parsers/DropItemCfg.ts @@ -6,7 +6,7 @@ export class DropItemCfg implements Cfg{ public id: number; public parname: string; public itemtypeid: number; - public Price: number; + public Price: string; public autopen: number; public drop: string; public weight: number; diff --git a/src/cfg/parsers/ItemFuncCfg.ts b/src/cfg/parsers/ItemFuncCfg.ts index b737774..d19b981 100644 --- a/src/cfg/parsers/ItemFuncCfg.ts +++ b/src/cfg/parsers/ItemFuncCfg.ts @@ -7,7 +7,6 @@ export class ItemFuncCfg implements Cfg{ public parname: string; public consume1: string; public consume2: string; - public selectiontimes: number; public actypeid: number; public get: string; @@ -16,7 +15,6 @@ export class ItemFuncCfg implements Cfg{ this.parname = data.parname; this.consume1 = data.consume1; this.consume2 = data.consume2; - this.selectiontimes = data.selectiontimes; this.actypeid = data.actypeid; this.get = data.get; }; diff --git a/src/logic/ItemCtrl.ts b/src/logic/ItemCtrl.ts index 9258463..d38eaf9 100644 --- a/src/logic/ItemCtrl.ts +++ b/src/logic/ItemCtrl.ts @@ -2,6 +2,7 @@ import { DropItemCfg } from "cfg/parsers/DropItemCfg"; import { ItemCardCfg } from "cfg/parsers/ItemCardCfg"; import { ZError } from "common/ZError"; import { BaseConst } from "constants/BaseConst"; +import { CommonItem, ItemInfo } from "./ItemDef"; let ItemMan = { // 卡牌按品质分 @@ -50,6 +51,7 @@ let ItemMan = { initItems(){ this._items.clear(); + // 默认id都唯一 this.initDropItems(); this.initCardItems(); @@ -59,7 +61,10 @@ let ItemMan = { initDropItems(){ let map: Map = global.$cfg.get(BaseConst.DROPITEM); map.forEach((v: DropItemCfg, k: number) => { - + if(k != 0){ + let item = new CommonItem(); + + } }); },