Files
ZYZ/shared/pubUtils/dictionary/DicExpeditionPoint.ts
2021-10-15 18:16:05 +08:00

24 lines
663 B
TypeScript

// 远征点数奖励表
import { parseGoodStr, readFileAndParse } from '../util';
import { FILENAME } from '../../consts';
import { RewardInter } from '../interface';
export interface DicExpeditionPoint {
// 远征点数
readonly point: number;
// 奖励
readonly reward: Array<RewardInter>;
}
export const dicExpeditionPoint = new Map<number, DicExpeditionPoint>();
export function loadExpeditionPoint() {
dicExpeditionPoint.clear();
let arr = readFileAndParse(FILENAME.DIC_EXPEDITION_POINT);
arr.forEach(o => {
o.reward = parseGoodStr(o.reward);
dicExpeditionPoint.set(o.point, o);
});
arr = undefined;
}