Branch_DNA
parent
b2f9dc0f93
commit
01e4a1d3b5
|
|
@ -283,7 +283,7 @@ function this.RefreshWindowData()
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
local proList=IncarnationManager.GetproDesLst(GiftManager.GetHeroGiftAddPro(curHeroData.dynamicId),"00FF00")
|
local proList=GiftManager.GetHeroGiftAddPro(curHeroData.dynamicId)
|
||||||
table.insert(proList,string.format("英雄潜能等级+%s",GiftManager.GetHeroGiftAddPotencyLv(curHeroData.dynamicId)))
|
table.insert(proList,string.format("英雄潜能等级+%s",GiftManager.GetHeroGiftAddPotencyLv(curHeroData.dynamicId)))
|
||||||
local originalList=GiftManager.GetHeroGiftAddOriginalPro(curHeroData.dynamicId)
|
local originalList=GiftManager.GetHeroGiftAddOriginalPro(curHeroData.dynamicId)
|
||||||
if proList and #proList>0 then
|
if proList and #proList>0 then
|
||||||
|
|
@ -298,15 +298,11 @@ function this.RefreshWindowData()
|
||||||
end
|
end
|
||||||
len=this.proGrid.transform.childCount
|
len=this.proGrid.transform.childCount
|
||||||
for i=1,len do
|
for i=1,len do
|
||||||
if i<=#proList-1 then
|
if i<=#proList then
|
||||||
this.proGrid.transform:GetChild(i-1).gameObject:SetActive(true)
|
--this.proGrid.transform:GetChild(i-1).gameObject:SetActive(true)
|
||||||
LogError("originalList[i]======================"..originalList[i])
|
--LogError("originalList[i]======================"..originalList[i])
|
||||||
this.proGrid.transform:GetChild(i-1):GetComponent("Text").text=proList[i]--..
|
--this.proGrid.transform:GetChild(i-1):GetComponent("Text").text=proList[i]
|
||||||
--string.format(" 命格加成+%s (%s%%)",math.floor(originalList[i]*GiftManager.GetPlayerGiftAdd()/100), GiftManager.GetPlayerGiftAdd())
|
this.SingleProShowData({proId=i,proVal=proList[i]},this.proGrid.transform:GetChild(i-1).gameObject)
|
||||||
--..string.format(" 特训加成+%s (%s%%)",math.floor(originalList[i]*HeroManager.ReturnGiftAtt()),HeroManager.ReturnGiftAtt())
|
|
||||||
elseif i==#proList then
|
|
||||||
this.proGrid.transform:GetChild(i-1).gameObject:SetActive(true)
|
|
||||||
this.proGrid.transform:GetChild(i-1):GetComponent("Text").text=proList[i]
|
|
||||||
else
|
else
|
||||||
this.proGrid.transform:GetChild(i-1).gameObject:SetActive(false)
|
this.proGrid.transform:GetChild(i-1).gameObject:SetActive(false)
|
||||||
end
|
end
|
||||||
|
|
@ -319,7 +315,32 @@ function this.RefreshWindowData()
|
||||||
--显示下面可赠送的
|
--显示下面可赠送的
|
||||||
this:OnClickTabBtn(1)
|
this:OnClickTabBtn(1)
|
||||||
end
|
end
|
||||||
|
function this.SingleProShowData(data,go)
|
||||||
|
go:SetActive(true)
|
||||||
|
for i = 1, 2 do
|
||||||
|
local curGo = go .transform:GetChild(i-1).gameObject
|
||||||
|
if #data > 1 then
|
||||||
|
curGo:SetActive(true)
|
||||||
|
Util.GetGameObject(curGo, "proName"):GetComponent("Text").text = GetLanguageStrById(propertyConfig[data[i].proId].Info)..":"
|
||||||
|
local proVale = Util.GetGameObject(curGo, "proVale"):GetComponent("Text")
|
||||||
|
if propertyConfig[data[i].proId].Style == 1 then--绝对值
|
||||||
|
proVale.text = GetPropertyFormatStr(propertyConfig[data[i].proId].Style, data[i].proVal)
|
||||||
|
elseif propertyConfig[data[i].proId].Style == 2 then--百分百
|
||||||
|
-- 暴击默认 10% 前端加显示
|
||||||
|
-- LogError("str:"..data[i].proId.." ".. GetLanguageStrById(propertyConfig[data[i].proId].Info))
|
||||||
|
if data[i].proId == 55 then
|
||||||
|
proVale.text = GetPropertyFormatStr(propertyConfig[data[i].proId].Style, data[i].proVal*100 + 1000)
|
||||||
|
else
|
||||||
|
proVale.text = GetPropertyFormatStr(propertyConfig[data[i].proId].Style, data[i].proVal*100)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
Util.GetGameObject(curGo, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(propertyConfig[data[i].proId].Icon)
|
||||||
|
else
|
||||||
|
curGo:SetActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--显示上面几个
|
--显示上面几个
|
||||||
function this.SingleUpItemShow(_go,data,_index)
|
function this.SingleUpItemShow(_go,data,_index)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue