宝石类型
This commit is contained in:
@@ -86,7 +86,7 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
|
||||
export const dicGoods = new Map<number, DicGoods>();
|
||||
export const blueprt = new Map<number, Array<number>>();
|
||||
export const jewels = new Map<number, Array<number>>();
|
||||
export const jewels = new Map<number, DicGoods>();
|
||||
let jewelsMap = {};
|
||||
arr.forEach(o => {
|
||||
o.goodsAbility = parseAbility(o);
|
||||
@@ -107,14 +107,16 @@ arr.forEach(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)));
|
||||
// }
|
||||
for (let key in jewelsMap) {
|
||||
let jewel = jewelsMap[key];
|
||||
let material = jewel.composeMaterial[0];
|
||||
if (!!material && !!material.id) {
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user