装备查询
This commit is contained in:
@@ -50,6 +50,10 @@ export interface DicGoods {
|
||||
// 属性外加的值,经验,好感
|
||||
readonly value: number;
|
||||
|
||||
readonly count?: number;
|
||||
|
||||
readonly nextJewelId?: number;
|
||||
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_GOODS);
|
||||
@@ -75,12 +79,15 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
suitId: true,
|
||||
specialAttr: true,
|
||||
value: true,
|
||||
pieceId: true
|
||||
pieceId: true,
|
||||
count: true,
|
||||
nextJewelId: true,
|
||||
}
|
||||
|
||||
export const dicGoods = new Map<number, DicGoods>();
|
||||
export const blueprt = new Map<number, Array<number>>();
|
||||
|
||||
export const jewels = new Map<number, Array<number>>();
|
||||
let jewelsMap = {};
|
||||
arr.forEach(o => {
|
||||
o.goodsAbility = parseAbility(o);
|
||||
o.goodsAbilityUp = parseAbilityUp(o);
|
||||
@@ -95,9 +102,22 @@ arr.forEach(o => {
|
||||
let arr = blueprt.get(o.quality)||new Array<number>();
|
||||
arr.push(o.good_id);
|
||||
blueprt.set(o.quality, arr);
|
||||
} else if (o.itid == IT_TYPE.JEWEL) {
|
||||
jewelsMap[o.good_id] = o;
|
||||
}
|
||||
});
|
||||
|
||||
// for (let key in jewelsMap) {
|
||||
// let jewel = jewelsMap[key];
|
||||
// let material = jewel.composeMaterial[0];
|
||||
// let nextJewel = jewelsMap[material.id];
|
||||
// nextJewel.count = material.count;
|
||||
// nextJewel.nextJewelId = material.id;
|
||||
// jewels.set(jewel.good_id, _.pick(nextJewel, Object.keys(DicGoodsKeys)));
|
||||
// }
|
||||
jewelsMap = undefined;
|
||||
arr = undefined;
|
||||
|
||||
function parseSpecialAttr(str: string) {
|
||||
let specialAttr = new Map<number, number>();
|
||||
if(str) {
|
||||
|
||||
Reference in New Issue
Block a user