随机任务

This commit is contained in:
wh_zcy 2022-11-07 23:11:20 +08:00
parent 695ca53690
commit cc64c14062
2 changed files with 20 additions and 8 deletions

View File

@ -93,40 +93,45 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
case comm.Rtype1:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam,
verify: this.modelRtask.verfiyRtype1,
update: this.modelRtaskRecord.overrideUpdate,
})
case comm.Rtype2:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam,
verify: this.modelRtask.verifyRtype2,
update: this.modelRtaskRecord.overrideUpdate,
})
case comm.Rtype3:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam,
verify: this.modelRtask.verifyRtype3,
update: this.modelRtaskRecord.overrideUpdate,
})
case comm.Rtype4:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam,
verify: this.modelRtask.verifyRtype4,
update: this.modelRtaskRecord.overrideUpdate,
})
case comm.Rtype5:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam,
verify: this.modelRtask.verifyRtype5,
update: this.modelRtaskRecord.overrideUpdate,
})
case comm.Rtype6:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam,
verify: this.modelRtask.verifyRtype6,
update: this.modelRtaskRecord.overrideUpdate,
})
// case comm.Rtype7:
// this.registerVerifyHandle(v.Id, &rtaskCondi{
// find: this.modelRtaskRecord.lessEqualFirstParam,
// cfg: typeCfg,
// verify: this.modelRtask.verfiyRtype7,
// update: this.modelRtaskRecord.addUpdate,
// })
case comm.Rtype8:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,

View File

@ -16,6 +16,13 @@ func (this *apiComp) QuitCheck(session comm.IUserSession, req *pb.SociatyQuitReq
func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (code pb.ErrorCode, data proto.Message) {
uid := session.GetUserId()
// 全局配置
ggd := this.module.configure.GetGlobalConf()
if ggd == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
sociaty := this.module.modelSociaty.getUserSociaty(uid)
if sociaty.Id == "" {
code = pb.ErrorCode_SociatyNoFound
@ -32,7 +39,7 @@ func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (co
//更新玩家sociatyId
update := map[string]interface{}{
"sociatyId": "", //玩家公会ID置空
"sociatyCd": utils.AddHour(24).Unix(),
"sociatyCd": utils.AddHour(int(ggd.GuildRejoinCd)).Unix(),
}
if err := this.module.ModuleUser.ChangeRemoteUserExpand(uid, update); err != nil {