寻宝:修复匹配
This commit is contained in:
@@ -110,13 +110,15 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
|
||||
}
|
||||
export const dicJewel = new Map<number, DicGoods>();
|
||||
export const dicGoods = new Map<number, DicGoods>();
|
||||
export const blueprt = new Map<number, Array<number>>();
|
||||
export const blueprtWithQuality = new Map<number, Array<number>>();
|
||||
export const blueprtWithQualityAndStar = new Map<string, Array<number>>();
|
||||
export const figureCondition = new Map<number, { params: number[], id: number, gid: number }[]>(); // type => {params, id, gid}
|
||||
|
||||
export function loadGoods() {
|
||||
dicJewel.clear();
|
||||
dicGoods.clear();
|
||||
blueprt.clear();
|
||||
blueprtWithQuality.clear();
|
||||
blueprtWithQualityAndStar.clear();
|
||||
figureCondition.clear();
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_GOODS);
|
||||
@@ -147,9 +149,12 @@ export function loadGoods() {
|
||||
dicGoods.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
|
||||
|
||||
if (o.itid == IT_TYPE.BLUEPRT) {
|
||||
let arr = blueprt.get(o.quality) || new Array<number>();
|
||||
let arr = blueprtWithQualityAndStar.get(`${o.quality}_${o.equipLvl}`) || new Array<number>();
|
||||
arr.push(o.good_id);
|
||||
blueprt.set(o.quality, arr);
|
||||
blueprtWithQualityAndStar.set(`${o.quality}_${o.equipLvl}`, arr);
|
||||
let arr2 = blueprtWithQuality.get(o.quality) || new Array<number>();
|
||||
arr.push(o.good_id);
|
||||
blueprtWithQuality.set(o.quality, arr2);
|
||||
} else if (o.goodType == GOOD_TYPE.JEWEL) {
|
||||
let material = o.composeMaterial[0];
|
||||
if (!!material && !!material.id) {
|
||||
|
||||
Reference in New Issue
Block a user