Files
ZYZ/shared/pubUtils/dictionary/DicCharExp.ts
2020-12-15 15:00:41 +08:00

21 lines
434 B
TypeScript

// 主公经验
import {readJsonFile} from '../util'
import { FILENAME } from '../../consts/consts'
export interface DicCharExp {
// 等级
readonly level: number;
// 经验
readonly exp: number;
}
const str = readJsonFile(FILENAME.DIC_CHAR_EXP);
let arr = JSON.parse(str);
export const dicCharExp = new Map<number, number>();
let exp = 0;
arr.forEach(o => {
exp += o.exp;
dicCharExp.set(o.level, exp);
});