From bfce45a6a00d7f6702f53b9c23fbae2437cbd821 Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Wed, 23 Nov 2022 15:57:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=AC=E4=BC=9A=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E4=BA=8B=E4=BB=B6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_rdtaskcondi.json | 2 +- modules/rtask/help.go | 5 ----- modules/rtask/module.go | 9 +-------- modules/rtask/verifyHandle.go | 15 --------------- modules/sociaty/api_cross_agree.go | 2 +- modules/sociaty/api_cross_apply.go | 2 +- 6 files changed, 4 insertions(+), 31 deletions(-) diff --git a/bin/json/game_rdtaskcondi.json b/bin/json/game_rdtaskcondi.json index 401ed62c5..4413da8df 100644 --- a/bin/json/game_rdtaskcondi.json +++ b/bin/json/game_rdtaskcondi.json @@ -1004,7 +1004,7 @@ "datatype": 2, "type": 109, "inited": [], - "data1": 0, + "data1": 1, "data2": 0, "data3": 0, "data4": 0, diff --git a/modules/rtask/help.go b/modules/rtask/help.go index ec69d9fec..477a2a421 100644 --- a/modules/rtask/help.go +++ b/modules/rtask/help.go @@ -10,11 +10,6 @@ import ( ) func lenParam(cfg *cfg.GameRdtaskCondiData, vals ...int32) (n int, err error) { - if cfg.Data1 == 0 { - if len(vals) == 1 { - return 1, nil - } - } if cfg.Data1 != 0 && cfg.Data2 != 0 && cfg.Data3 != 0 && cfg.Data4 != 0 && cfg.Data5 != 0 { if len(vals) != 5 { err = errors.New(fmt.Sprintf("%v 参数个数不一致,期望5实际是%v", cfg.Id, len(vals))) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index b688154dd..4b757921b 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -169,13 +169,6 @@ func (this *ModuleRtask) initRtaskVerifyHandle() { verify: this.modelRtaskRecord.verifyFirstGreatEqualParam, update: this.modelRtaskRecord.addUpdate, }) - case comm.Rtype109: - this.registerVerifyHandle(v.Id, &rtaskCondi{ - cfg: typeCfg, - find: this.modelRtaskRecord.equalParams, - verify: this.modelRtask.verifyRtype109, - update: this.modelRtaskRecord.overrideUpdate, - }) case comm.Rtype7, comm.Rtype12, comm.Rtype13, comm.Rtype14, comm.Rtype15, comm.Rtype19, comm.Rtype21, comm.Rtype24, comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, @@ -195,7 +188,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() { verify: this.modelRtask.verifyRtype20, update: this.modelRtaskRecord.overrideUpdate, }) - case comm.Rtype22: + case comm.Rtype22,comm.Rtype109: this.registerVerifyHandle(v.Id, &rtaskCondi{ cfg: typeCfg, find: this.modelRtaskRecord.equalFirstParam, diff --git a/modules/rtask/verifyHandle.go b/modules/rtask/verifyHandle.go index 10b8d1937..ea7cdd235 100644 --- a/modules/rtask/verifyHandle.go +++ b/modules/rtask/verifyHandle.go @@ -343,18 +343,3 @@ func (this *ModelRtask) verifyRtype63(uid string, cfg *cfg.GameRdtaskCondiData) return } - -// 加入公会 -func (this *ModelRtask) verifyRtype109(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) { - userModule, err := this.service.GetModule(comm.ModuleUser) - if err != nil { - return - } - - if um, y := userModule.(comm.IUser); y { - if user, err := um.GetUserExpand(uid); err == nil { - return user.SociatyId != "", nil - } - } - return -} diff --git a/modules/sociaty/api_cross_agree.go b/modules/sociaty/api_cross_agree.go index 7427aaf17..b6cbca27a 100644 --- a/modules/sociaty/api_cross_agree.go +++ b/modules/sociaty/api_cross_agree.go @@ -52,7 +52,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.SociatyAgreeReq) ( } // 触发任务条件 - this.module.ModuleRtask.SendToRtask(session, comm.Rtype109); + this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1) // 发邮件 if err := this.module.modelSociaty.sendMail("GuildApproved", []string{sociaty.Name}, []string{req.Uid}); err != nil { this.module.Error("发送邮件 模板ID:GuildApproved", log.Fields{"uid": uid, "申请人": req.Uid, "sociatyId": sociaty.Id}) diff --git a/modules/sociaty/api_cross_apply.go b/modules/sociaty/api_cross_apply.go index f662a585e..a992338ac 100644 --- a/modules/sociaty/api_cross_apply.go +++ b/modules/sociaty/api_cross_apply.go @@ -98,7 +98,7 @@ func (this *apiComp) Apply(session comm.IUserSession, req *pb.SociatyApplyReq) ( // 无需审核 if !isCheck { // 触发任务条件 - this.module.ModuleRtask.SendToRtask(session, comm.Rtype109) + this.module.ModuleRtask.SendToRtask(session, comm.Rtype109, 1) } rsp := &pb.SociatyApplyResp{ Uid: uid,