镇念塔:禁用角色
This commit is contained in:
@@ -34,6 +34,8 @@ export interface DicWar {
|
||||
readonly jackpotReward: Array<{id: number, weight: number}>;
|
||||
// 寻宝队友奖励
|
||||
readonly teammateReward: Array<{id: number, count: number}>;
|
||||
// 镇念塔禁用角色
|
||||
readonly fobiddenCharactor: Array<{type: number, id: number}>;
|
||||
}
|
||||
|
||||
export const dicWar = new Map<number, DicWar>();
|
||||
@@ -51,6 +53,7 @@ export function loadWar() {
|
||||
o.detailUIBg = parseDetailUIBg(o.detailUIBg);
|
||||
o.jackpotReward = parseJackpotReward(o.jackpotReward);
|
||||
o.teammateReward = parseFixReward(o.teammateReward);
|
||||
o.fobiddenCharactor = parseForbiddenChara(o.fobiddenCharactor);
|
||||
|
||||
dicWar.set(o.war_id, o);
|
||||
if(o.warType == WAR_TYPE.PVP) {
|
||||
@@ -122,4 +125,17 @@ function parseJackpotReward(str: string = '') {
|
||||
result.push({id: parseInt(id), weight: parseInt(weight)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
function parseForbiddenChara(str: string = '') {
|
||||
let result = new Array<{type: number, id: number}>();
|
||||
if(!str) return result;
|
||||
let decodeArr = decodeArrayListStr(str);
|
||||
for(let [type, id] of decodeArr) {
|
||||
if(isNaN(parseInt(type)) || isNaN(parseInt(id))) {
|
||||
throw new Error('data table format wrong');
|
||||
}
|
||||
result.push({type: parseInt(type), id: parseInt(id)});
|
||||
}
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user