恭送编队不检测大门闹天宫 and 车迟斗法失败刷新顺序修改

dev_chengFeng
zhangqiang 2020-08-10 11:30:27 +08:00
parent cca8355c33
commit a417e88b0b
3 changed files with 11 additions and 18 deletions

View File

@ -17,6 +17,7 @@ end
function BattleFailPopup:BindEvent()
Util.AddClick(this.btnClose, function ()
this.ClosePanelRefreshData()
if m_battlePanel then
m_battlePanel:ClosePanel()
end
@ -25,7 +26,7 @@ function BattleFailPopup:BindEvent()
if m_backPanel then
UIManager.OpenPanel(m_backPanel)
end
this.ClosePanelRefreshData()
-- this.ClosePanelRefreshData()
end)

View File

@ -100,7 +100,7 @@ function this.SingleHeroDataShow(go,_heroData)
SetHeroStars(starGrid, heroData.star,1,Vector2.New(32.5,32.5),-15)
local choosed =Util.GetGameObject(_go.transform, "choosed")
local formationMask =Util.GetGameObject(_go.transform, "formationMask")
formationMask:SetActive(heroData.isFormation ~= "" )
formationMask:SetActive(heroData.isFormation ~= "" and heroData.isFormations[1] ~= FormationTypeDef.EXPEDITION)
local lockMask =Util.GetGameObject(_go.transform, "lockMask")
lockMask:SetActive(heroData.lockState == 1)
choosed:SetActive(selectHeroData[heroData.dynamicId] ~= nil)
@ -164,7 +164,7 @@ function this.SortHeroDatas(_heroDatas)
if a ==nil or b == nil then
return
end
if a.isFormation == "" and b.isFormation == "" then
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormations[1] == FormationTypeDef.EXPEDITION)) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormations[1] == FormationTypeDef.EXPEDITION)) then
if a.lockState == b.lockState then
if a.heroConfig.Natural ==b.heroConfig.Natural then
if a.star == b.star then
@ -183,7 +183,7 @@ function this.SortHeroDatas(_heroDatas)
return a.lockState < b.lockState
end
else
return a.isFormation == "" and not b.dynamicId ~= ""
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormations[1] == FormationTypeDef.EXPEDITION)) and (not b.isFormation ~= "" and b.isFormations[1] ~= FormationTypeDef.EXPEDITION)
end
end)
end
@ -192,7 +192,7 @@ function this.QuickSelectListData(type)
if type == 1 then
selectHeroData={}
for k, v in pairs(tarHero) do
if LengthOfTable(selectHeroData)<maxSelectNum and v.isFormation == "" and v.lockState == 0 then
if LengthOfTable(selectHeroData)<maxSelectNum and (v.isFormation == "" or (v.isFormation ~= "" and v.isFormations[1] == FormationTypeDef.EXPEDITION)) and v.lockState == 0 then
selectHeroData[v.dynamicId]=v
else
break

View File

@ -135,7 +135,7 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
--Util.GetGameObject(go.transform, "heroStage"):GetComponent("Image").sprite = Util.LoadSprite(HeroStageSprite[heroData.heroConfig.HeroStage])
local formationMask = Util.GetGameObject(go.transform, "formationMask")
--LogError("heroData.isFormation "..heroData.isFormation)
formationMask:SetActive(heroData.isFormation ~= "" or heroData.lockState == 1)
formationMask:SetActive((heroData.isFormation ~= "" and heroData.isFormation ~= Language[11108]) or heroData.lockState == 1)
Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(heroData.isFormation ~= "" )
Util.GetGameObject(formationMask.transform, "lockImage"):SetActive( heroData.lockState == 1)
Util.GetGameObject(go.transform, "noumenon"):SetActive( heroData.id == curHeroData.id )
@ -171,19 +171,11 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
end
function this.HeroSortData(heroData)
Log("#heroData "..#heroData)
--Language[11108]
table.sort(heroData, function(a, b)
if a.isFormation == "" and b.isFormation == "" or a.isFormation ~= "" and b.isFormation ~= "" then
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormation == Language[11108]))
or (a.isFormation ~= "" and a.isFormation ~= Language[11108]) and (b.isFormation ~= "" and b.isFormation ~= Language[11108]) then
if a.lockState == b.lockState then
--if a.id == b.id then
-- if a.lv == b.lv then
-- return a.id > b.id
-- else
-- return a.lv < b.lv
-- end
--else
-- return a.id > b.id
--end
if a.heroConfig.Star == b.heroConfig.Star then
if a.lv == b.lv then
if a.id ~= curHeroData.id and b.id ~= curHeroData.id or a.id == curHeroData.id and b.id == curHeroData.id then
@ -201,7 +193,7 @@ function this.HeroSortData(heroData)
return a.lockState < b.lockState
end
else
return a.isFormation == "" and not b.dynamicId ~= ""
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (not b.dynamicId ~= "" and b.isFormation ~= Language[11108])
end
end)
end