寻宝:奖励

This commit is contained in:
luying
2022-07-27 18:08:26 +08:00
parent 1cb41f2733
commit e1dc6307d2
11 changed files with 285 additions and 193 deletions

View File

@@ -11,7 +11,7 @@ import { dicQuestion, loadQuestion } from "./dictionary/DicQuestion";
import { dicSe, loadSe } from "./dictionary/DicSe";
import { dicTower, loadTower } from "./dictionary/DicTower";
import { dicTowerTask, loadTowerTask } from "./dictionary/DicTowerTask";
import { dicWar, dicWarPvp, dicDailyWarByType, loadWar, dicHeroIdByWar } from "./dictionary/DicWar";
import { dicWar, dicWarPvp, dicDailyWarByType, loadWar, dicHeroIdByWar, dicComBattleReward } from "./dictionary/DicWar";
import { dicWarJson, loadWarJson } from "./dictionary/DicWarJson";
import { AUCTION_TIME } from "../consts";
import { dicFashions, dicFashionsByHeroId, loadFashions } from "./dictionary/DicFashions";
@@ -273,7 +273,9 @@ export const gameData = {
ladderConsume: new Array<{id: number, count: number, times: number}>(),
ladderMatch: dicLadderMatch,
ladderDifficultRatio: dicLadderDifficultRatio,
ladderRankReward: dicLadderRankReward
ladderRankReward: dicLadderRankReward,
comBattleRewardTime: new Array<{from: string, to: string}>(),
comBattleReward: dicComBattleReward,
};
// 在此提供一些原先在gamedata中提供的方法以便更方便获取gameData数据
@@ -382,8 +384,8 @@ export function getWarByBlueprtId(blueprtId: number) {
}
export function getRewardByBlueprtId(blueprtId: number) {
let { fixReward, teammateReward } = getWarByBlueprtId(blueprtId);
return { fixReward, teammateReward };
let { war_id } = getWarByBlueprtId(blueprtId);
return gameData.comBattleReward.get(war_id);
}
function parseComBtlLvRange() {
@@ -1038,6 +1040,7 @@ function parseDicParam() {
getCeRatio();
loadAuctionTime();
decodeLadderBuyCost();
parseComBattleRewardTime();
}
/**
@@ -1090,6 +1093,17 @@ function treatTaskGroup() {
}
}
function parseComBattleRewardTime() {
let str = param.TREASURE.TIME_REWARD;
if (!str) return
let result: { from: string, to: string }[] = [];
let decodeArr = decodeArrayListStr(str);
for (let [from, to] of decodeArr) {
result.push({ from, to });
}
gameData.comBattleRewardTime = result;
}
// 加载json
function loadDatas() {
loadHero();