From b50497a9e8f49ef317a9e4a261f34c1e39c524e8 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Wed, 14 Jun 2023 10:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A8=E9=80=81=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/worldtask/module.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index 5bbed8fc5..0b6f284d5 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -126,7 +126,7 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) { for _, cfg := range worldtaskConf.GetDataList() { for _, condId := range cfg.Completetask { for _, cond := range conds { - if condId == cond.Conid && cond.State == pb.BuriedItemFinishState_buried_finish { + if condId == cond.Conid { //&& cond.State == pb.BuriedItemFinishState_buried_finish { //校验任务是否是当前任务 if task, ok := userTask.CurrentTasks[cfg.Group]; ok { var currentTasks []*pb.CurrentTask @@ -160,8 +160,10 @@ func (this *Worldtask) TCondFinishNotify(uid string, conds []*pb.ConIProgress) { return } if curTaskConf.DeliverNpc == 0 { - this.modelWorldtask.taskFinish(session, t.TaskId, userTask, curTaskConf) - this.modelWorldtask.taskFinishPush(session, userTask, curTaskConf) + defer func() { + this.modelWorldtask.taskFinish(session, t.TaskId, userTask, curTaskConf) + this.modelWorldtask.taskFinishPush(session, userTask, curTaskConf) + }() } currentTasks = append(currentTasks, t) }