名将擂台:基础界面

This commit is contained in:
luying
2022-07-13 20:50:36 +08:00
parent 0ac40d1660
commit 4ee1f25876
10 changed files with 476 additions and 1 deletions

View File

@@ -269,6 +269,7 @@ export const gameData = {
towerPvpSubAttr: dicTowerPvpSubAttr,
sysOpenTime: dicSystemOpenTime,
randomEffectPoolPlan: dicRandomEffectPoolPlan,
ladderConsume: new Array<{id: number, count: number, times: number}>(),
};
// 在此提供一些原先在gamedata中提供的方法以便更方便获取gameData数据
@@ -969,6 +970,17 @@ export function getEquipStrenthenAttr(equipId: number, lv: number) {
return result
}
export function decodeLadderBuyCost() {
gameData.ladderConsume = [];
let str = param.LADDER.LADDER_CHALLENGE_BUY_TIMES_COST;
let arrs = decodeArrayListStr(str);
let sumTimes = 0;
for (let [ id, count, times] of arrs) {
sumTimes += parseInt(times);
gameData.ladderConsume.push({ id: parseInt(id), count: parseInt(count), times: sumTimes });
}
}
// 初始加载
function initDatas() {
parseDicParam();
@@ -987,6 +999,7 @@ function parseDicParam() {
parseComBtlLvRange();
getCeRatio();
loadAuctionTime();
decodeLadderBuyCost();
}
/**