26 lines
695 B
TypeScript
26 lines
695 B
TypeScript
// 装备强化表
|
|
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;
|
|
} |