置换 commit

dev_chengFeng
jiaoyangna 2020-08-28 00:09:07 +08:00
parent e6c8e81c82
commit 8e5e508494
2 changed files with 12 additions and 9 deletions

View File

@ -139,8 +139,8 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
Util.GetGameObject(go.transform, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
local formationMask = Util.GetGameObject(go.transform, "formationMask")
-- formationMask:SetActive(false)
formationMask:SetActive( #heroData.formationList ~= 0 or heroData.lockState == 1)--(heroData.isFormation ~= "" and heroData.isFormation ~= Language[11108])
Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(#heroData.formationList ~= 0)
formationMask:SetActive( LengthOfTable(heroData.formationList) ~= 0 or heroData.lockState == 1)--(heroData.isFormation ~= "" and heroData.isFormation ~= Language[11108])
Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(LengthOfTable(heroData.formationList) ~= 0)
Util.GetGameObject(formationMask.transform, "lockImage"):SetActive( heroData.lockState == 1)
Util.GetGameObject(go.transform, "noumenon"):SetActive( heroData.id == curHeroData.Id )
local starGrid = Util.GetGameObject(go.transform, "star")
@ -163,9 +163,9 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
end)
Util.AddOnceClick(formationMask, function()
if #heroData.formationList ~= 0 then
if LengthOfTable(heroData.formationList) ~= 0 then
local text = ""
for index, value in ipairs(heroData.formationList) do
for index, value in pairs(heroData.formationList) do
text = HeroManager.GetHeroFormationStr(index)
end
PopupTipPanel.ShowTip(text)
@ -209,7 +209,7 @@ function CompoundHeroUpStarListPanel:AutoSelectHero()
LogGreen("sssssssssssssssssssss")
curSelectHeroList = {}
for i = 1, #heroDataList do
if LengthOfTable(curSelectHeroList) < curNeedRoleNum and #heroDataList[i].formationList == 0 and heroDataList[i].lockState == 0 then--
if LengthOfTable(curSelectHeroList) < curNeedRoleNum and LengthOfTable(heroDataList[i].formationList) == 0 and heroDataList[i].lockState == 0 then--
LogGreen("heroDataList[i].dynamicId "..heroDataList[i].dynamicId)
curSelectHeroList[heroDataList[i].dynamicId]=heroDataList[i]
end

View File

@ -164,7 +164,9 @@ end
function this.SetHeroFormationList(heroDid,teamId,isAddOrDel)
if heroDatas[heroDid] then
LogRed("this.heroResolveLicence[teamId]:"..tostring(this.heroResolveLicence[teamId]))
if isAddOrDel and this.heroResolveLicence[teamId] then
LogRed("添加了")
heroDatas[heroDid].formationList[teamId] = teamId
else
heroDatas[heroDid].formationList[teamId] = nil
@ -2915,15 +2917,16 @@ function this.ByCompoundHeroGetAllHeros()
local downSoryHeroList = {}
for i, v in pairs(heroDatas) do
if v.star == 4 or v.star == 5 or v.star == 3 then--四星 五星 才能加 3星 是狗粮
if #v.formationList ~= 0 then
if LengthOfTable(v.formationList) ~= 0 then
local text = ""
for index, value in ipairs(v.formationList) do
text = HeroManager.GetHeroFormationStr(index)
for index, value in pairs(v.formationList) do
text = HeroManager.GetHeroFormationStr(value)
end
LogRed("text:"..text)
v.isFormation = text
end
table.insert(upSortHeroList,v)
table.insert(downSoryHeroList,v)
table.insert(downSoryHeroList,v)
end
end
table.sort(downSoryHeroList, function(a,b)