更新任务类型

This commit is contained in:
wh_zcy 2022-11-23 20:52:59 +08:00
parent 8f9f187086
commit dc3a8cc05c
2 changed files with 8 additions and 5 deletions

View File

@ -37,8 +37,9 @@ func (this *apiComp) Getreward(session comm.IUserSession, req *pb.FriendGetrewar
return return
} }
if code = this.moduleFriend.DispenseRes(session, this.moduleFriend.globalConf.FriendPeize, true); code != pb.ErrorCode_Success { globalConf := this.moduleFriend.configure.GetGlobalConf()
this.moduleFriend.Error("好友领奖励", log.Fields{"uid": uid, "reward": this.moduleFriend.globalConf.FriendPeize, "code": code}) if code = this.moduleFriend.DispenseRes(session, globalConf.FriendPeize, true); code != pb.ErrorCode_Success {
this.moduleFriend.Error("好友领奖励", log.Fields{"uid": uid, "reward": globalConf.FriendPeize, "code": code})
return return
} }

View File

@ -174,7 +174,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38, comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53, comm.Rtype39, comm.Rtype50, comm.Rtype51, comm.Rtype53,
comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60, comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60,
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72,comm.Rtype104: comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype104:
this.registerVerifyHandle(v.Id, &rtaskCondi{ this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg, cfg: typeCfg,
find: this.modelRtaskRecord.lessEqualFirstParam, find: this.modelRtaskRecord.lessEqualFirstParam,
@ -188,7 +188,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
verify: this.modelRtask.verifyRtype20, verify: this.modelRtask.verifyRtype20,
update: this.modelRtaskRecord.overrideUpdate, update: this.modelRtaskRecord.overrideUpdate,
}) })
case comm.Rtype22,comm.Rtype109: case comm.Rtype22, comm.Rtype109:
this.registerVerifyHandle(v.Id, &rtaskCondi{ this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg, cfg: typeCfg,
find: this.modelRtaskRecord.equalFirstParam, find: this.modelRtaskRecord.equalFirstParam,
@ -263,11 +263,13 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
} }
if v.find == nil { if v.find == nil {
this.Warn("未设置find Handle", log.Fields{"uid": uid, "condiId": codi.Id})
return return
} }
if condiId, err = v.find(v.cfg, params...); condiId == 0 { if condiId, err = v.find(v.cfg, params...); condiId == 0 {
if err != nil { if err != nil {
this.Warn(errors.WithMessage(err, uid).Error(), log.Fields{}) this.Warnln(errors.WithMessage(err, uid).Error())
} }
} else { } else {
condis = append(condis, v) condis = append(condis, v)