更新公会任务事件规则

This commit is contained in:
wh_zcy 2022-11-23 15:57:06 +08:00
parent 260a986b0f
commit bfce45a6a0
6 changed files with 4 additions and 31 deletions

View File

@ -1004,7 +1004,7 @@
"datatype": 2,
"type": 109,
"inited": [],
"data1": 0,
"data1": 1,
"data2": 0,
"data3": 0,
"data4": 0,

View File

@ -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)))

View File

@ -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,

View File

@ -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
}

View File

@ -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})

View File

@ -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,