许愿池

This commit is contained in:
mamengke01
2021-02-01 20:01:20 +08:00
parent b449995848
commit 830836b809
11 changed files with 149 additions and 36 deletions

View File

@@ -56,6 +56,8 @@ export interface DicGoods {
readonly nextJewelId?: number;
readonly specialCount?: number;
readonly nextSpecialId?: number;
// 对应的装备id
readonly equipId?: number;
}
const str = readJsonFile(FILENAME.DIC_GOODS);
@@ -85,7 +87,8 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
count: true,
nextJewelId: true,
specialCount: true,
nextSpecialId: true
nextSpecialId: true,
equipId: true
}
export const dicJewel = new Map<number, DicGoods>();
export const dicGoods = new Map<number, DicGoods>();
@@ -98,6 +101,11 @@ arr.forEach(o => {
o.specialAttr = parseSpecialAttr(o.specialAttr);
o.specialMaterial = parseSpecialMaterial(o.specialMaterial);
o.randomEffect = parseNumberList(o.randomEffect);
if (o.goodType == IT_TYPE.EQUIP_PIECE) {
let good = findWhere(arr, { pieceId: o.good_id });
if (!!good)
o.equipId = good.good_id;
}
dicGoods.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
if (o.itid == IT_TYPE.BLUEPRT) {