Rtype123
This commit is contained in:
parent
aa477d139c
commit
61250eaaf2
@ -80,7 +80,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle
|
|||||||
for _, v := range this.configure.getRtaskCondis(int32(tt)) {
|
for _, v := range this.configure.getRtaskCondis(int32(tt)) {
|
||||||
switch tt {
|
switch tt {
|
||||||
// 两个参数 大于1个参数且第一个参数累计,第二个参数等于
|
// 两个参数 大于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:
|
comm.Rtype125, comm.Rtype126, comm.Rtype127, comm.Rtype187:
|
||||||
handle := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
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.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.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.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.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.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,
|
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)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, 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:
|
default:
|
||||||
log.Warnf("rtaskType[%v] handle not register", tt)
|
log.Warnf("rtaskType[%v] handle not register", tt)
|
||||||
}
|
}
|
||||||
|
@ -483,3 +483,23 @@ func (this *ModelRtask) verifyRtype111(uid string, cfg *cfg.GameRdtaskCondiData,
|
|||||||
ok = true
|
ok = true
|
||||||
return
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user