Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
altair 2020-08-13 11:13:17 +08:00
commit f17e4e319a
3 changed files with 31 additions and 31 deletions

View File

@ -126,9 +126,9 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
Util.GetGameObject(go.transform, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName)) Util.GetGameObject(go.transform, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
local formationMask = Util.GetGameObject(go.transform, "formationMask") local formationMask = Util.GetGameObject(go.transform, "formationMask")
-- formationMask:SetActive(false) -- formationMask:SetActive(false)
formationMask:SetActive( #heroData.formationList ~= 0 or heroData.lockState == 1) formationMask:SetActive(false)-- LengthOfTable(heroData.formationList) ~= 0 or heroData.lockState == 1)
Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(heroData.formationList ~= 0 ) Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(false)--(LengthOfTable(heroData.formationList) ~= 0 )
Util.GetGameObject(formationMask.transform, "lockImage"):SetActive( heroData.lockState == 1) Util.GetGameObject(formationMask.transform, "lockImage"):SetActive(false)--( heroData.lockState == 1)
Util.GetGameObject(go.transform, "noumenon"):SetActive( heroData.id == curHeroData.id ) Util.GetGameObject(go.transform, "noumenon"):SetActive( heroData.id == curHeroData.id )
local starGrid = Util.GetGameObject(go.transform, "star") local starGrid = Util.GetGameObject(go.transform, "star")
SetHeroStars(starGrid, heroData.star,1,nil,nil,Vector2.New(0,1)) SetHeroStars(starGrid, heroData.star,1,nil,nil,Vector2.New(0,1))
@ -148,34 +148,34 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
choosed:SetActive(true) choosed:SetActive(true)
this.numText.text=string.format("%s/%s",LengthOfTable(curSelectHeroList),curNeedRoleNum) this.numText.text=string.format("%s/%s",LengthOfTable(curSelectHeroList),curNeedRoleNum)
end) end)
Util.AddOnceClick(formationMask, function() -- Util.AddOnceClick(formationMask, function()
if #heroData.formationList ~= 0 then -- if #heroData.formationList ~= 0 then
local text = "" -- local text = ""
for index, value in ipairs(heroData.formationList) do -- for index, value in ipairs(heroData.formationList) do
text = HeroManager.GetHeroFormationStr(index) -- text = HeroManager.GetHeroFormationStr(index)
end -- end
PopupTipPanel.ShowTip(text) -- PopupTipPanel.ShowTip(text)
return -- return
end -- end
if heroData.lockState == 1 then -- if heroData.lockState == 1 then
PopupTipPanel.ShowTip(Language[11776]) -- PopupTipPanel.ShowTip(Language[11776])
return -- return
end -- end
end) -- end)
end end
function this.HeroSortData(heroData) function this.HeroSortData(heroData)
Log("#heroData "..#heroData) -- Log("#heroData "..#heroData)
--Language[11108] --Language[11108]
table.sort(heroData, function(a, b) table.sort(heroData, function(a, b)
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormation == Language[11108])) if (LengthOfTable( a.formationList) == 0 and LengthOfTable( b.formationList) == 0)
or (a.isFormation ~= "" and a.isFormation ~= Language[11108]) and (b.isFormation ~= "" and b.isFormation ~= Language[11108]) then or (LengthOfTable(a.formationList) > 0) and (LengthOfTable(b.formationList) > 0) then
if a.lockState == b.lockState then if a.lockState == b.lockState then
if a.heroConfig.Star == b.heroConfig.Star then if a.heroConfig.Star == b.heroConfig.Star then
if a.lv == b.lv 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 if a.id ~= curHeroData.Id and b.id ~= curHeroData.Id or a.id == curHeroData.Id and b.id == curHeroData.Id then
return a.id > b.id return a.id > b.id
else else
return not a.id ~= curHeroData.id and b.id == curHeroData.id return not a.id ~= curHeroData.Id and b.id == curHeroData.Id
end end
else else
return a.lv < b.lv return a.lv < b.lv
@ -187,14 +187,14 @@ function this.HeroSortData(heroData)
return a.lockState < b.lockState return a.lockState < b.lockState
end end
else else
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (not b.dynamicId ~= "" and b.isFormation ~= Language[11108]) return LengthOfTable( a.formationList) == 0 and LengthOfTable(b.formationList) > 0
end end
end) end)
end end
function CompoundHeroFirstUpStarListPanel:AutoSelectHero() function CompoundHeroFirstUpStarListPanel:AutoSelectHero()
curSelectHeroList = {} curSelectHeroList = {}
for i = 1, #heroDataList do 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--
curSelectHeroList[heroDataList[i].dynamicId]=heroDataList[i] curSelectHeroList[heroDataList[i].dynamicId]=heroDataList[i]
end end
end end

View File

@ -178,11 +178,11 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
end) end)
end end
function this.HeroSortData(heroData) function this.HeroSortData(heroData)
Log("#heroData "..#heroData) -- Log("#heroData "..#heroData)
--Language[11108] --Language[11108]
table.sort(heroData, function(a, b) table.sort(heroData, function(a, b)
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormation == Language[11108])) if (LengthOfTable( a.formationList) == 0 and LengthOfTable( b.formationList) == 0)
or (a.isFormation ~= "" and a.isFormation ~= Language[11108]) and (b.isFormation ~= "" and b.isFormation ~= Language[11108]) then or (LengthOfTable(a.formationList) > 0) and (LengthOfTable(b.formationList) > 0) then
if a.lockState == b.lockState then if a.lockState == b.lockState then
if a.heroConfig.Star == b.heroConfig.Star then if a.heroConfig.Star == b.heroConfig.Star then
if a.lv == b.lv then if a.lv == b.lv then
@ -201,7 +201,7 @@ function this.HeroSortData(heroData)
return a.lockState < b.lockState return a.lockState < b.lockState
end end
else else
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (not b.dynamicId ~= "" and b.isFormation ~= Language[11108]) return LengthOfTable( a.formationList) == 0 and LengthOfTable(b.formationList) > 0
end end
end) end)
end end

View File

@ -308,7 +308,7 @@ function this.UpdateUpStarPosHeroData(curSelectHeroList,_upStarData,go)
else else
upStarMaterialIsAll[upStarData[2]]=1 upStarMaterialIsAll[upStarData[2]]=1
Util.GetGameObject(curGo.transform,"add/add"):SetActive(false) Util.GetGameObject(curGo.transform,"add/add"):SetActive(false)
Util.GetGameObject(curGo.transform,"num"):GetComponent("Text").text=string.format("<color=#FFFFFFFF>%s/%s</color>", LengthOfTable(curSelectHeroList),upStarData[4]) Util.GetGameObject(curGo.transform,"num"):GetComponent("Text").text=string.format("<color=#00FF06>%s/%s</color>", LengthOfTable(curSelectHeroList),upStarData[4])
end end
local curUpStarConsumeMaterial={} local curUpStarConsumeMaterial={}
for i, v in pairs(curSelectHeroList) do for i, v in pairs(curSelectHeroList) do
@ -345,7 +345,7 @@ function this.UpdateUpStarPosHeroData2(curSelectHeroList)
local _curUpStarData = this.GetAllHeroCompoundData2(curSelectHeroConfig.config,curSelectHeroConfig,true) local _curUpStarData = this.GetAllHeroCompoundData2(curSelectHeroConfig.config,curSelectHeroConfig,true)
if curSelectHero then this.UpdateHeroUpStarData(_curUpStarData) end if curSelectHero then this.UpdateHeroUpStarData(_curUpStarData) end
Util.GetGameObject(curSelectUpStarGo.transform,"add/add"):SetActive(false) Util.GetGameObject(curSelectUpStarGo.transform,"add/add"):SetActive(false)
Util.GetGameObject(curSelectUpStarGo.transform,"num"):GetComponent("Text").text=string.format("<color=#FFFFFFFF>%s/%s</color>", LengthOfTable(curSelectHeroList),1) Util.GetGameObject(curSelectUpStarGo.transform,"num"):GetComponent("Text").text=string.format("<color=#00FF06>%s/%s</color>", LengthOfTable(curSelectHeroList),1)
end end
end end
@ -372,7 +372,7 @@ function this.UpdateFirstHeroUpStarData(curHeroCompoundData)
proImage:GetComponent("Image").sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName)) proImage:GetComponent("Image").sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
SetHeroStars(starGrid, heroConfig.Star,1,nil,-15.3) SetHeroStars(starGrid, heroConfig.Star,1,nil,-15.3)
if curSelectHero and curSelectHero.heroConfig then if curSelectHero and curSelectHero.heroConfig then
num:GetComponent("Text").text=string.format("<color=#FFFFFF>%s/%s</color>",1,1) num:GetComponent("Text").text=string.format("<color=#00FF06>%s/%s</color>",1,1)
else else
num:GetComponent("Text").text=string.format("<color=#FF0000FF>%s/%s</color>",0,1) num:GetComponent("Text").text=string.format("<color=#FF0000FF>%s/%s</color>",0,1)
end end