装备
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// 藏宝图合成表
|
||||
import { readJsonFile, parseNumberList } from '../util'
|
||||
import { FILENAME } from '../../consts'
|
||||
const _ = require('lodash');
|
||||
|
||||
export interface DicHeroEquip {
|
||||
readonly itId: number;
|
||||
readonly classId: Array<number>;
|
||||
}
|
||||
|
||||
const str = readJsonFile(FILENAME.DIC_HERO_EQUIP);
|
||||
let arr = JSON.parse(str);
|
||||
type KeysEnum<T> = { [P in keyof Required<T>]: true };
|
||||
const DicHeroEquipKeys: KeysEnum<DicHeroEquip> = {
|
||||
itId: true,
|
||||
classId: true
|
||||
}
|
||||
export const dicHeroEquip = new Map<number, DicHeroEquip>();
|
||||
arr.forEach(o => {
|
||||
o.classId = parseNumberList(o.classId);
|
||||
dicHeroEquip.set(o.itId, _.pick(o, Object.keys(DicHeroEquipKeys)));
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
@@ -59,4 +59,6 @@ arr.forEach(o => {
|
||||
}
|
||||
jobClassAndgrades.set(o.job_class+'_'+o.grade,{unlockLevel:o.unlockLevel, jobid:o.jobid});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
arr = undefined;
|
||||
Reference in New Issue
Block a user