[礼物]======================礼物增加属性显示修改提交

TCX_dev_realOne_master
PC-202302260912\Administrator 2023-12-19 16:56:45 +08:00
parent 7904ac0594
commit 48c1e41635
4 changed files with 50 additions and 10 deletions

View File

@ -225,11 +225,12 @@ function this.GetPlayerGiftAddPotencyLv()
end
--获取英雄礼物添加的潜能等级
function this.GetHeroGiftAddPotencyLv()
function this.GetHeroGiftAddPotencyLv(did)
local lv=0
if this.playerGifts and #this.playerGifts>0 then
for i=1,#this.playerGifts do
local id=this.playerGifts[i]
if this.allHeroGifts and this.allHeroGifts[did] then
local list=this.allHeroGifts[did]
for i=1,#list do
local id=list[i]
if equipConfig[id] and equipConfig[id].PotentialNew and #equipConfig[id].PotentialNew>0 and type(equipConfig[id].PotentialNew[1])~="userdata" then
lv=lv+equipConfig[id].PotentialNew[2]
end
@ -293,7 +294,18 @@ function this.CheckSuperGemRed()
end
function this.GetPlayerGiftAdd()
local addPro=0
if this.playerGifts and #this.playerGifts>0 then
for i=1,#this.playerGifts do
local id=this.playerGifts[i]
if equipConfig[id] and equipConfig[id].HeroGitUp and equipConfig[id].HeroGitUp>0 then
addPro=addPro + equipConfig[id].HeroGitUp
end
end
end
return addPro/100
end

View File

@ -351,8 +351,15 @@ function RewardEquipSingleShowPopup2:OnShow()
local vText = Util.GetGameObject(_BaseProList[num], "curProVale"):GetComponent("Text")
-- Util.GetGameObject(vText.gameObject, "homeValue"):GetComponent("Text").text = ""--摘星阁加持文字显示位置
local str=""
if prop[2] > 0 then
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])
if equipConfigData.Position==8 and self.curHeroData then
prop[2]=math.floor(prop[2]*(1+GiftManager.GetPlayerGiftAdd()/100)+0.5)
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])..string.format("(主角礼物加成%s%%)",GiftManager.GetPlayerGiftAdd())
else
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])
end
else
vText.text = GetPropertyFormatStr(proConfigData.Style, prop[2])
end
@ -360,6 +367,7 @@ function RewardEquipSingleShowPopup2:OnShow()
end
end
for i=1,#equipConfigData.PlayerProperty do
local prop=equipConfigData.PlayerProperty[i]
if tonumber(prop[1])~=nil then
@ -383,6 +391,21 @@ function RewardEquipSingleShowPopup2:OnShow()
end
end
if equipConfigData.Position==7 or equipConfigData.Position==8 then
if equipConfigData.PotentialNew and #equipConfigData.PotentialNew>0 and type(equipConfigData.PotentialNew[1])~="userdata" then
num=num+1
if not _BaseProList[num] then
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
end
_BaseProList[num]:SetActive(true)
Util.GetGameObject(_BaseProList[num], "curProVale").gameObject:SetActive(false)
if equipConfigData.Position==7 then
_BaseProList[num]:GetComponent("Text").text ="全体神将潜能等级+"..equipConfigData.PotentialNew[2]
elseif equipConfigData.Position==8 then
_BaseProList[num]:GetComponent("Text").text = "神将潜能等级+"..equipConfigData.PotentialNew[2]
end
end
end
-- for index, prop in ipairs(equipConfigData.PlayerProperty) do
-- LogError("prop[1]=========="..prop[1])
-- if tonumber(prop[1]~=nil) then

View File

@ -238,6 +238,7 @@ function this.RefreshWindowData()
this:OnClickTabBtn(1)
local proList=IncarnationManager.GetproDesLst(GiftManager.GetPlayerGiftAddPro(),"00FF00")
table.insert(proList,string.format("全体神将潜能等级+%s",GiftManager.GetPlayerGiftAddPotencyLv()))
if proList and #proList>0 then
this.proGrid:SetActive(true)
this.proEmptyObj:SetActive(false)
@ -261,7 +262,7 @@ function this.RefreshWindowData()
this.proGrid:SetActive(false)
this.proEmptyObj:SetActive(true)
end
this.tipInfo.text=string.format("潜能等级+%s",GiftManager.GetPlayerGiftAddPotencyLv())
--this.tipInfo.text=string.format("全体神将潜能等级+%s",GiftManager.GetPlayerGiftAddPotencyLv())
end

View File

@ -264,6 +264,7 @@ function this.RefreshWindowData()
)
local proList=IncarnationManager.GetproDesLst(GiftManager.GetHeroGiftAddPro(curHeroData.dynamicId),"00FF00")
table.insert(proList,string.format("神将潜能等级+%s",GiftManager.GetHeroGiftAddPotencyLv(curHeroData.dynamicId)))
if proList and #proList>0 then
this.proGrid:SetActive(true)
this.proEmptyObj:SetActive(false)
@ -276,9 +277,12 @@ function this.RefreshWindowData()
end
len=this.proGrid.transform.childCount
for i=1,len do
if i<=#proList then
if i<=#proList-1 then
this.proGrid.transform:GetChild(i-1).gameObject:SetActive(true)
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%%)",GiftManager.GetPlayerGiftAdd())
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
this.proGrid.transform:GetChild(i-1).gameObject:SetActive(false)
end
@ -287,7 +291,7 @@ function this.RefreshWindowData()
this.proGrid:SetActive(false)
this.proEmptyObj:SetActive(true)
end
this.tipInfo.text=string.format("潜能等级+%s",GiftManager.GetHeroGiftAddPotencyLv())
--this.tipInfo.text=string.format("神将潜能等级+%s",GiftManager.GetHeroGiftAddPotencyLv(curHeroData.dynamicId))
--显示下面可赠送的
this:OnClickTabBtn(1)
end