添加字典表解析

This commit is contained in:
luying
2020-12-15 15:00:41 +08:00
parent 2a268b2158
commit 87cdd7a80f
33 changed files with 1462 additions and 47 deletions
+21
View File
@@ -0,0 +1,21 @@
// 主公经验
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);
});