远征:模板计算
This commit is contained in:
@@ -45,7 +45,8 @@ export interface DicWarJson {
|
||||
readonly enemyType: number;
|
||||
// 召唤技能的召唤物
|
||||
readonly callSkillData: string;
|
||||
|
||||
// 敌军数量
|
||||
readonly enemyCount: number;
|
||||
}
|
||||
|
||||
export const dicWarJson = new Map<number, Array<DicWarJson>>();
|
||||
@@ -54,9 +55,14 @@ export function loadWarJson() {
|
||||
|
||||
let warjson = new Array<DicWarJson>();
|
||||
let warid = 0;
|
||||
let enemyCount = 0;
|
||||
arr.forEach(o => {
|
||||
o.attribute = parseAttribute(o.attribute);
|
||||
if(o.warId) warid = o.warId;
|
||||
if(o.relation == 2) enemyCount++;
|
||||
});
|
||||
arr.forEach(o => {
|
||||
o.enemyCount = enemyCount;
|
||||
warjson.push(o);
|
||||
});
|
||||
dicWarJson.set(warid, warjson);
|
||||
|
||||
Reference in New Issue
Block a user