编队bug
parent
a86e5b6d4c
commit
4bc63fb367
|
@ -111,9 +111,11 @@ function this.RefreshFormation(index, roleList, pokemonList,isDiffmonster)
|
|||
end
|
||||
local oldTeamheroInfos = {}
|
||||
for i = 1, #curFormation.teamHeroInfos do
|
||||
oldTeamheroInfos[curFormation.teamHeroInfos[i].heroId] = curFormation.teamHeroInfos[i]
|
||||
if not newTeamheroInfos[curFormation.teamHeroInfos[i].heroId] then
|
||||
HeroManager.SetHeroFormationList(curFormation.teamHeroInfos[i].heroId,this.formationList[index].teamId,nil)
|
||||
if curFormation.teamHeroInfos[i] then
|
||||
oldTeamheroInfos[curFormation.teamHeroInfos[i].heroId] = curFormation.teamHeroInfos[i]
|
||||
if not newTeamheroInfos[curFormation.teamHeroInfos[i].heroId] then
|
||||
HeroManager.SetHeroFormationList(curFormation.teamHeroInfos[i].heroId,this.formationList[index].teamId,nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -520,7 +520,9 @@ function this.SortHeroDatas(_heroDatas)
|
|||
end
|
||||
for j = 1, #curFormation.teamHeroInfos do
|
||||
local teamInfo = curFormation.teamHeroInfos[j]
|
||||
choosed[teamInfo.heroId] = j
|
||||
if teamInfo then
|
||||
choosed[teamInfo.heroId] = j
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(_heroDatas, function(a, b)
|
||||
|
|
Loading…
Reference in New Issue