随机任务
This commit is contained in:
parent
695ca53690
commit
cc64c14062
@ -93,40 +93,45 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
|
|||||||
case comm.Rtype1:
|
case comm.Rtype1:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
cfg: typeCfg,
|
||||||
|
find: this.modelRtaskRecord.equalFirstParam,
|
||||||
verify: this.modelRtask.verfiyRtype1,
|
verify: this.modelRtask.verfiyRtype1,
|
||||||
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
})
|
})
|
||||||
case comm.Rtype2:
|
case comm.Rtype2:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
cfg: typeCfg,
|
||||||
|
find: this.modelRtaskRecord.equalFirstParam,
|
||||||
verify: this.modelRtask.verifyRtype2,
|
verify: this.modelRtask.verifyRtype2,
|
||||||
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
})
|
})
|
||||||
case comm.Rtype3:
|
case comm.Rtype3:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
cfg: typeCfg,
|
||||||
|
find: this.modelRtaskRecord.equalFirstParam,
|
||||||
verify: this.modelRtask.verifyRtype3,
|
verify: this.modelRtask.verifyRtype3,
|
||||||
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
})
|
})
|
||||||
case comm.Rtype4:
|
case comm.Rtype4:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
cfg: typeCfg,
|
||||||
|
find: this.modelRtaskRecord.equalFirstParam,
|
||||||
verify: this.modelRtask.verifyRtype4,
|
verify: this.modelRtask.verifyRtype4,
|
||||||
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
})
|
})
|
||||||
case comm.Rtype5:
|
case comm.Rtype5:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
cfg: typeCfg,
|
||||||
|
find: this.modelRtaskRecord.equalFirstParam,
|
||||||
verify: this.modelRtask.verifyRtype5,
|
verify: this.modelRtask.verifyRtype5,
|
||||||
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
})
|
})
|
||||||
case comm.Rtype6:
|
case comm.Rtype6:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
cfg: typeCfg,
|
||||||
|
find: this.modelRtaskRecord.equalFirstParam,
|
||||||
verify: this.modelRtask.verifyRtype6,
|
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:
|
case comm.Rtype8:
|
||||||
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
this.registerVerifyHandle(v.Id, &rtaskCondi{
|
||||||
cfg: typeCfg,
|
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) {
|
func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (code pb.ErrorCode, data proto.Message) {
|
||||||
uid := session.GetUserId()
|
uid := session.GetUserId()
|
||||||
|
// 全局配置
|
||||||
|
ggd := this.module.configure.GetGlobalConf()
|
||||||
|
if ggd == nil {
|
||||||
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
sociaty := this.module.modelSociaty.getUserSociaty(uid)
|
||||||
if sociaty.Id == "" {
|
if sociaty.Id == "" {
|
||||||
code = pb.ErrorCode_SociatyNoFound
|
code = pb.ErrorCode_SociatyNoFound
|
||||||
@ -32,7 +39,7 @@ func (this *apiComp) Quit(session comm.IUserSession, req *pb.SociatyQuitReq) (co
|
|||||||
//更新玩家sociatyId
|
//更新玩家sociatyId
|
||||||
update := map[string]interface{}{
|
update := map[string]interface{}{
|
||||||
"sociatyId": "", //玩家公会ID置空
|
"sociatyId": "", //玩家公会ID置空
|
||||||
"sociatyCd": utils.AddHour(24).Unix(),
|
"sociatyCd": utils.AddHour(int(ggd.GuildRejoinCd)).Unix(),
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := this.module.ModuleUser.ChangeRemoteUserExpand(uid, update); err != nil {
|
if err := this.module.ModuleUser.ChangeRemoteUserExpand(uid, update); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user