添加字典表解析

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
+23
View File
@@ -0,0 +1,23 @@
// 寻宝表
import { readJsonFile } from '../util'
import { FILENAME } from '../../consts/consts'
export interface DicXunbao {
// 品质
readonly quality: number;
// 品质名
readonly name: number;
// 协助次数
readonly assistanceTime: number;
// 最低协助等级
readonly assistanceLevel: number;
}
const str = readJsonFile(FILENAME.DIC_XUNBAO);
let arr = JSON.parse(str);
export const dicXunbao = new Map<number, DicXunbao>();
arr.forEach(o => {
dicXunbao.set(o.quality, o);
});