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