From cd798d8c3465936950c5c7a2298c99a3587abc82 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Tue, 23 May 2023 09:45:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=A7=A6=E5=8F=91=E5=8C=BA?= =?UTF-8?q?=E5=88=86=E6=8E=A5=E5=8F=96=E5=92=8C=E5=88=9B=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 2 +- modules/rtask/module.go | 12 +++++------- modules/worldtask/model_worldtask.go | 9 +++++++++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/comm/const.go b/comm/const.go index 4b40e31d5..862289aa4 100644 --- a/comm/const.go +++ b/comm/const.go @@ -652,7 +652,7 @@ const ( Rtype183 TaskType = 183 Rtype184 TaskType = 184 Rtype185 TaskType = 185 - Rtype186 TaskType = 186 + Rtype186 TaskType = 186 //武馆的派遣悬赏X次 ) const ( diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 39eab486e..023110049 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -311,15 +311,13 @@ func (this *ModuleRtask) processOneTask(session comm.IUserSession, rtaskType com if conf.Data == 1 { //接取 if r, ok := record.Vals[handle.condId]; ok { - if r.Flag == 0 { + if r.Flag == 0 { //非接取 r.Data = make(map[int32]int32) - r.Flag = 1 + r.Rtype = conf.Type + }else{ + return } - } else { - record.Vals[handle.condId] = &pb.RtaskData{ - Flag: 1, - } - } + } } if handle.update != nil { diff --git a/modules/worldtask/model_worldtask.go b/modules/worldtask/model_worldtask.go index 397da73c1..c9173f9f4 100644 --- a/modules/worldtask/model_worldtask.go +++ b/modules/worldtask/model_worldtask.go @@ -146,6 +146,15 @@ func (this *ModelWorldtask) checkCondi(uid string, condiId int32) bool { ) return false } + //update flag=1 + dr := iwt.GetCondiData(uid) + if dr != nil { + if v, ok := dr.Vals[condiId]; ok { + v.Flag = 1 + iwt.ChangeCondi(uid, dr.Vals) + } + + } return true } }