✨ feat(gvg): 添加激战期排行榜奖励资源
This commit is contained in:
@@ -132,6 +132,7 @@ import { dicGVGVestige, loadGVGVestige } from './dictionary/DicGVGVestige';
|
||||
import { DicGVGVestigeRange, dicGVGVestigeRange, loadGVGVestigeRange } from './dictionary/DicGVGVestigeRange';
|
||||
import { DicGVGVestigeLeagueRank, dicGVGVestigeLeagueRank, loadGVGVestigeLeagueRank } from "./dictionary/DicGVGVestigeLeagueRank";
|
||||
import { dicGVGAreaPoint, loadGVGAreaPoint } from "./dictionary/DicGVGAreaPoint";
|
||||
import { DicGVGBattleRankReward, dicGVGBattleRankReward, loadGVGBattleRankReward } from './dictionary/DicGVGBattleRankReward';
|
||||
|
||||
export const gameData = {
|
||||
daily: dicDaily,
|
||||
@@ -332,6 +333,7 @@ export const gameData = {
|
||||
gvgVestigeLeagueRank: dicGVGVestigeLeagueRank,
|
||||
gvgVestigeName: dicGVGVestigeName,
|
||||
gvgAreaPoint: dicGVGAreaPoint,
|
||||
gvgBattleRankReward: dicGVGBattleRankReward,
|
||||
};
|
||||
|
||||
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
|
||||
@@ -1198,6 +1200,19 @@ export function getGVGVestigeLeagueRank(myLeagueRank: number) {
|
||||
return lastRank
|
||||
}
|
||||
|
||||
export function getGVGBattleRankReward(type: number, rank: number) {
|
||||
let arr = gameData.gvgBattleRankReward.get(type)||[];
|
||||
let lastRank: DicGVGBattleRankReward;
|
||||
for(let dic of arr) {
|
||||
lastRank = dic;
|
||||
let { min, max } = dic;
|
||||
if(min <= rank && (max >= rank || max == -1)) {
|
||||
return dic;
|
||||
}
|
||||
}
|
||||
return lastRank
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
function initDatas() {
|
||||
parseDicParam();
|
||||
@@ -1410,6 +1425,7 @@ function loadDatas() {
|
||||
loadGVGVestigeRange();
|
||||
loadGVGVestigeLeagueRank();
|
||||
loadGVGAreaPoint();
|
||||
loadGVGBattleRankReward();
|
||||
}
|
||||
|
||||
// 重载dicParam
|
||||
|
||||
Reference in New Issue
Block a user