添加新增的任务类型

This commit is contained in:
wh_zcy 2022-11-22 19:11:53 +08:00
parent 7d893294c3
commit b616265815
2 changed files with 5 additions and 3 deletions

View File

@ -208,7 +208,7 @@ func (this *ModuleRtask) initRtaskVerifyHandle() {
comm.Rtype42, comm.Rtype43, comm.Rtype45,
comm.Rtype46, comm.Rtype47, comm.Rtype48, comm.Rtype49,
comm.Rtype52, comm.Rtype55, comm.Rtype56,
comm.Rtype65, comm.Rtype66, comm.Rtype67, comm.Rtype68:
comm.Rtype65, comm.Rtype66, comm.Rtype67, comm.Rtype68, comm.Rtype140:
this.registerVerifyHandle(v.Id, &rtaskCondi{
cfg: typeCfg,
find: this.modelRtaskRecord.lessThanParams,
@ -260,7 +260,7 @@ func (this *ModuleRtask) SendToRtask(session comm.IUserSession, rtaskType comm.T
}
if condiId, err = v.find(v.cfg, params...); condiId == 0 {
if err != nil {
this.Warn(errors.WithMessage(err, uid).Error(),log.Fields{})
this.Warn(errors.WithMessage(err, uid).Error(), log.Fields{})
}
} else {
condis = append(condis, v)

View File

@ -3,6 +3,7 @@ package rtask
import (
"go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log"
"go_dreamfactory/modules/task"
"go_dreamfactory/pb"
"go_dreamfactory/sys/configure"
@ -56,7 +57,7 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond
return
}
}
log.Debug("覆盖数值更新", log.Fields{"uid": uid, "condiId": cfg.Id, "params": vals, "updated": record.Vals[cfg.Id]})
this.listenTask(uid, cfg.Id)
return
}
@ -97,6 +98,7 @@ func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData
}
err = this.Change(uid, update)
}
log.Debug("累计次数更新", log.Fields{"uid": uid, "condiId": cfg.Id, "params": vals, "updated": record.Vals[cfg.Id]})
this.listenTask(uid, cfg.Id)
return