Files
ZYZ/shared/pubUtils/dictionary/DicEquipStrength.ts
2022-02-15 18:46:56 +08:00

26 lines
695 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 装备强化表
import { readFileAndParse, parseGoodStr } from '../util'
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
export interface DicEquipStrength {
// id
readonly id: number;
// 等级,1级升2级读2级数据
readonly lv: number;
// 消耗
readonly consume: RewardInter[];
}
export const dicEquipStrength = new Map<number, DicEquipStrength>();
export function loadEquipStrength() {
dicEquipStrength.clear();
let arr = readFileAndParse(FILENAME.DIC_EQUIP_STRENGTH);
arr.forEach(o => {
o.consume = parseGoodStr(o.consume);
dicEquipStrength.set(o.lv, o);
});
arr = undefined;
}