feat(gvg): 宝箱奖励和等级奖励

This commit is contained in:
luying
2023-01-16 20:28:13 +08:00
parent 44476e2430
commit 7895c08f16
7 changed files with 138 additions and 18 deletions

View File

@@ -0,0 +1,30 @@
// GVG千机阁
import { FILENAME } from '../../consts'
import { RewardInter } from '../interface';
import { parseGoodStr, readFileAndParse } from '../util'
export interface DicGVGContributeBox {
// 唯一id
id: number;
// 职能 1-贤臣 2-猛将
job: number;
// 所需积分点
boxPoint: number;
// 奖励,普通背包物品
boxReward: RewardInter[];
// 奖励,联军相关道具物品
boxLeagueReward: RewardInter[];
}
export const dicGVGContributeBox = new Map<number, DicGVGContributeBox>();
export function loadGVGContributeBox() {
dicGVGContributeBox.clear();
let arr = readFileAndParse(FILENAME.DIC_GVG_CONTRIBUTE_BOX);
arr.forEach(o => {
o.boxReward = parseGoodStr(o.boxReward);
o.boxLeagueReward = parseGoodStr(o.boxLeagueReward)
dicGVGContributeBox.set(o.id, o);
});
arr = undefined;
}