✨ feat(gvg): 宝箱奖励和等级奖励
This commit is contained in:
@@ -123,6 +123,7 @@ import { dicGVGTech, loadGVGTech } from "./dictionary/DicGVGTech";
|
||||
import { dicGVGItem, loadGVGItem } from "./dictionary/DicGVGItems";
|
||||
import { dicGVGLeagueLv, loadGVGLeagueLv } from "./dictionary/DicGVGLeagueLv";
|
||||
import { dicGVGResourceBase, dicGVGResourceBaseByType, dicGVGResourceBaseByLv, loadGVGResourceBase, DicGVGResourceBase } from './dictionary/DicGVGResourceBase';
|
||||
import { dicGVGContributeBox, loadGVGContributeBox } from './dictionary/DicGVGContributeBox';
|
||||
|
||||
export const gameData = {
|
||||
daily: dicDaily,
|
||||
@@ -310,6 +311,7 @@ export const gameData = {
|
||||
gvgResourceBaseByLv: dicGVGResourceBaseByLv,
|
||||
gvgFieldAddType: new Map<number, number>(),
|
||||
gvgSpFieldRatio: { min: 0, max: 0},
|
||||
gvgContributeBox: dicGVGContributeBox,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -1343,6 +1345,7 @@ function loadDatas() {
|
||||
loadGVGItem();
|
||||
loadGVGLeagueLv();
|
||||
loadGVGResourceBase();
|
||||
loadGVGContributeBox();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
30
shared/pubUtils/dictionary/DicGVGContributeBox.ts
Normal file
30
shared/pubUtils/dictionary/DicGVGContributeBox.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user