机器人回响判断

This commit is contained in:
meixiongfeng 2023-08-28 14:08:27 +08:00
parent cdc0afecc3
commit 1b15516ac3

View File

@ -84,8 +84,12 @@ func (this *ModuleRobot_Hero) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa
bMax := false
// 获取英雄数据
var bFound bool
for k, v := range this.heros {
if c, err := this.GMGetTalentByHeroId(k); err != nil {
for _, v := range this.heros {
if c, err := this.GMGetTalentByHeroId(v.HeroID); err == nil {
if this.talent == nil {
resp.TalentID = c[0].Skillid
resp.Heroid = v.HeroID
} else {
for _, v1 := range this.talent {
if len(v1.Talent) == len(c) {
bMax = true
@ -103,6 +107,8 @@ func (this *ModuleRobot_Hero) DoTask(robot IRobot, taskconf *cfg.GameWorldTaskDa
}
}
}
}
if bMax { // 当前英雄全满共鸣后 继续找下一个英雄
continue
}