This commit is contained in:
liwei1dao 2023-05-26 16:08:04 +08:00
commit 01b746ee7f
2 changed files with 26 additions and 0 deletions

View File

@ -230,6 +230,14 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
}
handles = append(handles, handle)
this.registerVerifyHandle(v.Id, handle)
case comm.Rtype111:
handle := &rtaskCondHandle{
condId: v.Id,
verify: this.modelRtask.verifyRtype111,
update: this.modelRtaskRecord.addUpdate,
}
handles = append(handles, handle)
this.registerVerifyHandle(v.Id, handle)
default:
log.Warnf("rtaskType[%v] handle not register", tt)
}

View File

@ -465,3 +465,21 @@ func (this *ModelRtask) verifyRtype43(uid string, cfg *cfg.GameRdtaskCondiData,
ok = true
return
}
func (this *ModelRtask) verifyRtype111(uid string, cfg *cfg.GameRdtaskCondiData, params ...int32) (ok bool, count int32, err error) {
m, err := this.service.GetModule(comm.ModuleHero)
if err != nil {
return
}
if ml, y := m.(comm.IHero); y {
for _, hero := range ml.GetHeroList(uid) {
if ok, err = soGreatEqual(hero.Lv, cfg.Data2); ok {
count++
return
}
}
}
ok = true
return
}