活动:删除多余代码

This commit is contained in:
qiaoxin
2021-05-28 15:23:16 +08:00
parent 750ebd7232
commit 480f8458f8
12 changed files with 24 additions and 158 deletions
+1 -43
View File
@@ -64,48 +64,7 @@ export class GrowthItem {
}
public isComplete(): boolean {
let complete = false;
switch (this.taskType) {
case TASK_TYPE.ROLE_LV:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.GUILD_JOIN:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.LOGIN_SUM:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.HERO_NUM:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.ROLE_TITLE:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.GASHA:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.EQUIP_STRENGTHEN:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.BATTLE_MAIN:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.EQUIP_JEWEL_SUM:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.GUILD_TRAIN:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.ROLE_SCHOOL_PUT_HERO:
complete = this.totalCount >= this.condition;
break;
case TASK_TYPE.GUILD_ACTIVITY:
complete = this.totalCount >= this.condition;
break;
default:
complete = false;
break;
}
let complete = this.totalCount >= this.condition;
return complete;
}
}
@@ -168,7 +127,6 @@ export class GrowthData extends ActivityBase {
if (obj.taskType === TASK_TYPE.HERO_NUM) {
obj.totalCount = heroNum;
} else if (obj.taskType === TASK_TYPE.HERO_LV) {
obj.taskParam
let lv = obj.taskParamArray[1];
let heroes = userHeroes.filter(hero => { return hero.lv >= lv })
obj.totalCount = heroes.length;