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