随机任务
This commit is contained in:
parent
695ca53690
commit
cc64c14062
@ -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,
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user