✨ feat(gvg): 添加策划表解析
This commit is contained in:
30
shared/pubUtils/dictionary/DicGVGVestigeLeagueRank.ts
Normal file
30
shared/pubUtils/dictionary/DicGVGVestigeLeagueRank.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
// GVG遗迹
|
||||
import { FILENAME } from '../../consts'
|
||||
import { RewardInter } from '../interface';
|
||||
import { parseGoodStr, readFileAndParse } from '../util'
|
||||
|
||||
export interface DicGVGVestigeLeagueRank {
|
||||
// id
|
||||
readonly id: number;
|
||||
// 最低排名
|
||||
readonly rankMin: number;
|
||||
// 最高排名
|
||||
readonly rankMax: number;
|
||||
// 普通奖励
|
||||
readonly rankReward: RewardInter[];
|
||||
// gvg内奖励
|
||||
readonly rankLeagueReward: RewardInter[];
|
||||
}
|
||||
|
||||
export const dicGVGVestigeLeagueRank: DicGVGVestigeLeagueRank[] = [];
|
||||
export function loadGVGVestigeLeagueRank() {
|
||||
dicGVGVestigeLeagueRank.splice(0, dicGVGVestigeLeagueRank.length);
|
||||
|
||||
let arr = readFileAndParse(FILENAME.DIC_GVG_VESTIGE_LEAGUE_RANK);
|
||||
arr.forEach(o => {
|
||||
o.rankReward = parseGoodStr(o.rankReward);
|
||||
o.rankLeagueReward = parseGoodStr(o.rankLeagueReward);
|
||||
dicGVGVestigeLeagueRank.push(o);
|
||||
});
|
||||
arr = undefined;
|
||||
}
|
||||
Reference in New Issue
Block a user