寻宝:协助次数&匹配范围修改

This commit is contained in:
luying
2022-02-17 20:01:57 +08:00
parent 41e0f3a457
commit c87f50ced0
14 changed files with 205 additions and 354 deletions

View File

@@ -109,14 +109,10 @@ const DicGoodsKeys: KeysEnum<DicGoods> = {
equipLvl: true
}
export const dicGoods = new Map<number, DicGoods>();
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() {
dicGoods.clear();
blueprtWithQuality.clear();
blueprtWithQualityAndStar.clear();
figureCondition.clear();
let arr = readFileAndParse(FILENAME.DIC_GOODS);
@@ -145,15 +141,6 @@ export function loadGoods() {
o.jobLimited = parseNumberList(o.jobLimited);
o.charLimited = parseNumberList(o.charLimited);
dicGoods.set(o.good_id, _.pick(o, Object.keys(DicGoodsKeys)));
if (o.itid == IT_TYPE.BLUEPRT) {
let arr = blueprtWithQualityAndStar.get(`${o.quality}_${o.equipLvl}`) || new Array<number>();
arr.push(o.good_id);
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);
}
});
arr = undefined;

View File

@@ -24,10 +24,13 @@ export interface DicJewel {
readonly mapGoodId: number;
// 淬炼消耗
readonly quenchConsume: RewardInter[];
// 寻宝关卡id
readonly gkId: number;
}
export const dicJewel = new Map<number, DicJewel>();
export const dicBlueprt = new Map<number, number>();
export const dicBlueprtByLv = new Map<number, number[]>();
export function loadJewel() {
dicJewel.clear();
@@ -37,6 +40,11 @@ export function loadJewel() {
o.randomEffect = parseNumberList(o.randomEffect);
o.quenchConsume = parseGoodStr(o.quenchConsume);
dicJewel.set(o.good_id, o);
dicBlueprt.set(o.mapGoodId, o.good_id);
if(!dicBlueprtByLv.has(o.lv)) {
dicBlueprtByLv.set(o.lv, []);
}
dicBlueprtByLv.get(o.lv).push(o.mapGoodId);
});
arr = undefined;
}