添加字典表解析

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

View File

@@ -0,0 +1,23 @@
// 武将羁绊好感等级表
import { readJsonFile } from '../util';
import { FILENAME } from '../../consts/consts';
export interface DicFriendShipLevel {
// 等级
readonly level: number;
// 下一级经验
readonly exp: number;
// 加成百分比
readonly add: number;
}
const str = readJsonFile(FILENAME.DIC_FRIEND_SHIP);
let arr = JSON.parse(str);
export const dicFriendShipLevel = new Array<DicFriendShipLevel>();
arr.forEach(o => {
dicFriendShipLevel.push(o);
});
dicFriendShipLevel.sort(function(a, b) {
return a.level - b.level;
});