宝石
This commit is contained in:
@@ -54,7 +54,8 @@ export interface DicGoods {
|
||||
readonly count?: number;
|
||||
|
||||
readonly nextJewelId?: number;
|
||||
|
||||
readonly specialCount?: number;
|
||||
readonly nextSpecialId?: number;
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_GOODS);
|
||||
@@ -83,6 +84,8 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
pieceId: true,
|
||||
count: true,
|
||||
nextJewelId: true,
|
||||
specialCount: true,
|
||||
nextSpecialId: true
|
||||
}
|
||||
export const dicJewel = new Map<number, DicGoods>();
|
||||
export const dicGoods = new Map<number, DicGoods>();
|
||||
@@ -108,8 +111,14 @@ arr.forEach(o => {
|
||||
if (!!lastJewel) {
|
||||
lastJewel.count = material.count;
|
||||
lastJewel.nextJewelId = o.good_id;
|
||||
if (!!o.specialMaterial.ids[0]) {
|
||||
lastJewel.specialCount = o.specialMaterial.ids[0];
|
||||
lastJewel.nextSpecialId = o.specialMaterial.count;
|
||||
}
|
||||
dicJewel.set(lastJewel.good_id, _.pick(lastJewel, Object.keys(DicGoodsKeys)));
|
||||
}
|
||||
} else {
|
||||
dicJewel.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user