check 该英雄天赋满级

This commit is contained in:
meixiongfeng 2023-08-28 11:40:47 +08:00
parent 4029b664e4
commit ee20a2db32

View File

@ -76,11 +76,17 @@ func (this *ModuleRobot_Hero) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa
ObjId: "",
Heroid: "",
}
// check 该英雄天赋满级
bMax := false
// 获取英雄数据
var bFound bool
for k, v := range this.heros {
if c, err := this.GMGetTalentByHeroId(k); err != nil {
for _, v1 := range this.talent {
if len(v1.Talent) == len(c) {
bMax = true
break
}
if v1.HeroId == v.HeroID {
bFound = true
resp.ObjId = v1.Id
@ -93,6 +99,9 @@ func (this *ModuleRobot_Hero) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa
}
}
}
if bMax { // 当前英雄全满共鸣后 继续找下一个英雄
continue
}
break
}