好友:修改详情界面关卡显示

This commit is contained in:
luying
2021-02-23 09:37:21 +08:00
parent 8e4e97ee82
commit 41b57d0e04
3 changed files with 31 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
// 关卡表
import {decodeArrayListStr, readJsonFile} from '../util'
import {decodeArrayListStr, decodeArrayStr, readJsonFile} from '../util'
import { WAR_RELATE_TABLES, WAR_TYPE } from '../../consts';
export interface DicWar {
@@ -26,7 +26,8 @@ export interface DicWar {
readonly previousGk: number;
// 每日任务下的小类型
readonly dailyType: number;
// 显示章节名
readonly detailUIBg: string[];
}
export const dicWar = new Map<number, DicWar>();
@@ -40,6 +41,8 @@ for(let filename of WAR_RELATE_TABLES) {
o.fixReward = parseFixReward(o.fixReward);
o.conditionReward = parseConditionReward(o.conditionReward);
o.parseRandomReward = parseRandomReward(o.parseRandomReward);
o.detailUIBg = parseDetailUIBg(o.detailUIBg);
dicWar.set(o.war_id, o);
if(o.warType == WAR_TYPE.PVP) {
dicWarPvp.push(o);
@@ -84,4 +87,11 @@ function parseRandomReward(str: string = '') {
result.push({id: parseInt(id), count: parseInt(count), frequency: parseInt(frequency)});
}
return result
}
function parseDetailUIBg(str: string = '') {
let result = new Array<string>();
if(!str) return result;
let decodeArr = decodeArrayStr(str, '_');
return decodeArr;
}