feat(gvg): 激战期接口详细返回

This commit is contained in:
luying
2023-02-17 10:59:38 +08:00
parent ab0b7aa9ae
commit 26832196b6
14 changed files with 917 additions and 214 deletions
+12 -1
View File
@@ -131,7 +131,7 @@ import { dicGVGVestigeByType, dicGVGVestigeName, loadGVGVestigeType } from './di
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 { dicGVGAreaPoint, loadGVGAreaPoint, dicGVGPointsByAreaId } from "./dictionary/DicGVGAreaPoint";
import { DicGVGBattleRankReward, dicGVGBattleRankReward, loadGVGBattleRankReward } from './dictionary/DicGVGBattleRankReward';
export const gameData = {
@@ -335,6 +335,8 @@ export const gameData = {
gvgAreaPoint: dicGVGAreaPoint,
gvgBattleRankReward: dicGVGBattleRankReward,
gvgBattleDurabilityMinus: { win: 0, fail: 0 },
gvgTeamDurability: new Map<number, number>(),
gvgPointByAreaId: dicGVGPointsByAreaId,
};
// 在此提供一些原先在gamedata中提供的方法,以便更方便获取gameData数据
@@ -1220,6 +1222,14 @@ function parseGVGDurabilityMinus() {
gameData.gvgBattleDurabilityMinus.fail = range[0];
}
function parseGVGTeamDurability() {
let arr = decodeArrayListStr(param.GVG.GVG_TEAM_NUMBER);
for(let [index, _lv, durability] of arr) {
gameData.gvgTeamDurability.set(parseInt(index), parseInt(durability));
}
}
// 初始加载
function initDatas() {
parseDicParam();
@@ -1244,6 +1254,7 @@ function parseDicParam() {
parseGVGFieldAdd();
parseGVGVestigeCnt();
parseGVGDurabilityMinus();
parseGVGTeamDurability();
}
/**