From 14acc426a02222e4cd0bd3e3e371ffbd297ed0a8 Mon Sep 17 00:00:00 2001 From: qiaoxin Date: Thu, 20 May 2021 14:23:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=EF=BC=9A=E4=B8=83=E5=A4=A9?= =?UTF-8?q?=E4=B9=90=E6=8C=91=E6=88=98=E6=B4=BB=E5=8A=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=96=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activityField/dailyChallengesField.ts | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/shared/domain/activityField/dailyChallengesField.ts b/shared/domain/activityField/dailyChallengesField.ts index 66672f8b2..49ec7cc3c 100644 --- a/shared/domain/activityField/dailyChallengesField.ts +++ b/shared/domain/activityField/dailyChallengesField.ts @@ -14,7 +14,7 @@ export class DailyItem { name: string; // 任务名称 taskType: number; // 任务类型 dic_zyz_taskType.json taskParam: string; //任务数据 dic_zyz_taskType.json - taskParamArray: Array; //任务数据 dic_zyz_taskType.json + condition: number; //任务数据条件 dic_zyz_taskType.jsonT reward: string; // 任务奖励,格式:1&3&1(类型&id&数量) 类型定义:1.英雄,2.物品 totalCount: number = 0; //完成任务累计次数 @@ -27,8 +27,6 @@ export class DailyItem { this.taskType = data.taskType; this.taskParam = data.taskParam; this.reward = data.reward; - - this.taskParamArray = splitString(data.taskParam, '&') } public heroReward(): CreateHeroParam[] { @@ -59,40 +57,40 @@ export class DailyItem { let complete = false; switch (this.taskType) { case TASK_TYPE.ROLE_LV: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.GUILD_JOIN: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.LOGIN_SUM: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.HERO_NUM: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.ROLE_TITLE: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.GASHA: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.EQUIP_STRENGTHEN: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.BATTLE_MAIN: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.EQUIP_JEWEL_SUM: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.GUILD_TRAIN: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.ROLE_SCHOOL_PUT_HERO: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; case TASK_TYPE.GUILD_ACTIVITY: - complete = this.totalCount >= this.taskParamArray[0]; + complete = this.totalCount >= this.condition; break; default: complete = false;