diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 004219f4c..a012f635c 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -80,7 +80,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle for _, v := range this.configure.getRtaskCondis(int32(tt)) { switch tt { // 两个参数 大于1个参数且第一个参数累计,第二个参数等于 - case comm.Rtype1, comm.Rtype16, comm.Rtype17, comm.Rtype51, + case comm.Rtype1, comm.Rtype16, comm.Rtype17, comm.Rtype51, comm.Rtype121, comm.Rtype125, comm.Rtype126, comm.Rtype127, comm.Rtype187: handle := &rtaskCondHandle{ condId: v.Id, @@ -137,7 +137,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle comm.Rtype90, comm.Rtype91, comm.Rtype92, comm.Rtype94, comm.Rtype95, comm.Rtype97, comm.Rtype96, comm.Rtype98, comm.Rtype99, comm.Rtype104, comm.Rtype102, comm.Rtype103, comm.Rtype105, comm.Rtype106, comm.Rtype108, comm.Rtype113, comm.Rtype114, comm.Rtype115, comm.Rtype116, comm.Rtype117, comm.Rtype118, comm.Rtype119, - comm.Rtype120, comm.Rtype121, comm.Rtype123, comm.Rtype124, comm.Rtype128, + comm.Rtype120, comm.Rtype124, comm.Rtype128, comm.Rtype130, comm.Rtype131, comm.Rtype132, comm.Rtype135, comm.Rtype141, comm.Rtype142, comm.Rtype143, comm.Rtype144, comm.Rtype145, comm.Rtype146, comm.Rtype147, comm.Rtype148, comm.Rtype149, comm.Rtype152, comm.Rtype153, comm.Rtype154, comm.Rtype156, @@ -238,6 +238,14 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle } handles = append(handles, handle) this.registerVerifyHandle(v.Id, handle) + case comm.Rtype123: + handle := &rtaskCondHandle{ + condId: v.Id, + verify: this.modelRtask.verifyRtype123, + update: this.modelRtaskRecord.addUpdate, + } + handles = append(handles, handle) + this.registerVerifyHandle(v.Id, handle) default: log.Warnf("rtaskType[%v] handle not register", tt) } diff --git a/modules/rtask/verifyHandle.go b/modules/rtask/verifyHandle.go index 6f8fada39..b8b5e92e4 100644 --- a/modules/rtask/verifyHandle.go +++ b/modules/rtask/verifyHandle.go @@ -483,3 +483,23 @@ func (this *ModelRtask) verifyRtype111(uid string, cfg *cfg.GameRdtaskCondiData, ok = true return } + +func (this *ModelRtask) verifyRtype123(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 _, heroId := range ml.QueryHeroTelnetByCount(uid, int(cfg.Data2)) { + hero, ec := ml.GetHeroByObjID(uid, heroId) + if ec == pb.ErrorCode_Success { + if hero.Star == cfg.Data3 { + count++ + } + } + } + } + ok = true + return +}