Files
ZYZ/shared/pubUtils/dictionary/DicFriendShipLevel.ts
2020-12-16 16:47:29 +08:00

25 lines
695 B
TypeScript

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