【森罗幻境】选择英雄按战力发送英雄顺序

dev_chengFeng
ZhangBiao 2021-04-14 20:00:06 +08:00 committed by JieLing
parent bf4145ff73
commit 749fd32ed0
2 changed files with 6 additions and 3 deletions

View File

@ -78,6 +78,9 @@ function FormationEditPopup:BindEvent()
for i, v in ipairs(choosedList) do
table.insert(dids,v.did)
end
table.sort(dids,function (a,b)
return HeroManager.GetSingleHeroData(a.heroId).warPower > HeroManager.GetSingleHeroData(b.heroId).warPower
end)
if #choosedList <= maxNum and #choosedList > 0 then
NetManager.TrialHeroInfoSaveRequest(dids,function(msg)
PopupTipPanel.ShowTip(Language[10670])

View File

@ -518,9 +518,9 @@ function this.SetSelectHero(isFirstIn,isFirstData,isMainIn)
end
end
end
table.sort(d,function (a,b)
return HeroManager.GetSingleHeroData(a.heroId).warPower > HeroManager.GetSingleHeroData(b.heroId).warPower
end)
-- table.sort(d,function (a,b)
-- return HeroManager.GetSingleHeroData(a.heroId).warPower > HeroManager.GetSingleHeroData(b.heroId).warPower
-- end)
for i, v in ipairs(d) do
if MapTrialManager.selectHeroDid ~= "" then
if MapTrialManager.selectHeroDid==v.heroId and v.heroHp <= 0 then