置换编队检测还原
parent
94e0dc10df
commit
80f59d54f1
|
@ -217,7 +217,7 @@ function this.SingleHeroDataShow(_go,_heroData)
|
|||
|
||||
local formationMask = Util.GetGameObject(go.transform, "formationMask")
|
||||
local formationImage = Util.GetGameObject(go.transform, "formationMask/formationImage/upImage"):GetComponent("Image")
|
||||
if LengthOfTable(heroData.isFormations) ~= 0 then
|
||||
if LengthOfTable(heroData.formationList) ~= 0 then
|
||||
--if LengthOfTable(heroData.formationList) ~= 0 then
|
||||
formationMask:SetActive(true)
|
||||
formationImage.sprite = Util.LoadSprite("t_tongyong-yishangzheng")
|
||||
|
@ -326,10 +326,10 @@ function this.SingleHeroDataShow(_go,_heroData)
|
|||
end)
|
||||
|
||||
Util.AddOnceClick(formationMask, function()
|
||||
if LengthOfTable(heroData.isFormations) ~= 0 then
|
||||
if LengthOfTable(heroData.formationList) ~= 0 then
|
||||
local text = ""
|
||||
for key, value in pairs(heroData.isFormations) do
|
||||
text = Language[12317]..HeroManager.GetHeroFormationStr2(key)..Language[12318]
|
||||
for key, value in pairs(heroData.formationList) do
|
||||
text = Language[12317]..HeroManager.GetHeroFormationStr2(value)..Language[12318]
|
||||
end
|
||||
PopupTipPanel.ShowTip(text)
|
||||
return
|
||||
|
|
|
@ -164,7 +164,7 @@ end
|
|||
|
||||
function this.SetHeroFormationList(heroDid,teamId,isAddOrDel)
|
||||
if heroDatas[heroDid] then
|
||||
if isAddOrDel then
|
||||
if isAddOrDel and this.heroResolveLicence[teamId] then
|
||||
heroDatas[heroDid].formationList[teamId] = teamId
|
||||
else
|
||||
heroDatas[heroDid].formationList[teamId] = nil
|
||||
|
@ -2959,18 +2959,6 @@ function this.ByReplaceHeroGetAllHeros()
|
|||
table.insert(sortHeroList,v)
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in ipairs(sortHeroList) do
|
||||
local isFormations = {}
|
||||
for n, w in ipairs(v.formationList) do
|
||||
local isFormationStr = HeroManager.GetHeroFormationStr(w)
|
||||
if isFormationStr and isFormationStr ~= "" then
|
||||
table.insert(isFormations, w)
|
||||
end
|
||||
end
|
||||
v.isFormations = isFormations
|
||||
end
|
||||
|
||||
table.sort(sortHeroList, function(a,b)
|
||||
if a.star == b.star then
|
||||
if a.lv == b.lv then
|
||||
|
|
Loading…
Reference in New Issue