🐞 fix(gvg): gvg个人排行

This commit is contained in:
luying
2023-02-18 19:22:01 +08:00
parent 8065a81988
commit 96cbc19391
8 changed files with 156 additions and 56 deletions

View File

@@ -0,0 +1,30 @@
// GVG遗迹
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
import { parseGoodStr, readFileAndParse } from '../util'
export interface DicGVGVestigePlayerRank {
// id
readonly id: number;
// 最低排名
readonly rankMin: number;
// 最高排名
readonly rankMax: number;
// 普通奖励
readonly rankPlayerReward: RewardInter[];
// gvg内奖励
readonly rankPlayerLeagueReward: RewardInter[];
}
export const dicGVGVestigePlayerRank: DicGVGVestigePlayerRank[] = [];
export function loadGVGVestigePlayerRank() {
dicGVGVestigePlayerRank.splice(0, dicGVGVestigePlayerRank.length);
let arr = readFileAndParse(FILENAME.DIC_GVG_VESTIGE_PLAYER_RANK);
arr.forEach(o => {
o.rankPlayerReward = parseGoodStr(o.rankPlayerReward);
o.rankPlayerLeagueReward = parseGoodStr(o.rankPlayerLeagueReward);
dicGVGVestigePlayerRank.push(o);
});
arr = undefined;
}