[礼物]================英雄礼物属性显示修改
parent
1dcaa4054a
commit
82c8a561a3
|
|
@ -5197,7 +5197,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 298, y: -25}
|
||||
m_AnchoredPosition: {x: 238, y: -25}
|
||||
m_SizeDelta: {x: 250, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7321926799232025417
|
||||
|
|
@ -5230,7 +5230,7 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 34
|
||||
m_FontSize: 30
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
|
|
@ -5425,7 +5425,7 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 34
|
||||
m_FontSize: 30
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ function this.GetHeroGiftAddPro(_id)
|
|||
end
|
||||
--HeroGitUp
|
||||
local list=this.allHeroGifts[_id]
|
||||
|
||||
for i=1,#list do
|
||||
local id=list[i]
|
||||
local pro = equipConfig[id].Property
|
||||
|
|
@ -121,12 +122,7 @@ function this.GetHeroGiftAddPro(_id)
|
|||
end
|
||||
end
|
||||
end
|
||||
if CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) then
|
||||
local t=HeroManager.ReturnGiftAtt()
|
||||
for k, v in ipairs(data) do
|
||||
data[k]=data[k]*(1+t)
|
||||
end
|
||||
end
|
||||
|
||||
--英雄礼物不会加成主角属性
|
||||
-- local pro2 = equipConfig[id].PlayerProperty
|
||||
-- if pro2 and #pro2>0 then
|
||||
|
|
@ -138,14 +134,74 @@ function this.GetHeroGiftAddPro(_id)
|
|||
-- end
|
||||
-- end
|
||||
end
|
||||
local trainAdd=0
|
||||
if CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) then
|
||||
trainAdd=HeroManager.ReturnGiftAtt()
|
||||
-- for k, v in ipairs(data) do
|
||||
-- data[k]=data[k]*(1+t)
|
||||
-- end
|
||||
end
|
||||
if addPro>0 then
|
||||
for k, v in pairs(data) do
|
||||
data[k]=math.floor(v*(1+addPro/10000)+0.5)
|
||||
data[k]=math.floor(v*(1+addPro/10000+trainAdd)+0.5)
|
||||
end
|
||||
end
|
||||
return data
|
||||
end
|
||||
|
||||
--获取英雄礼物增加的白板属性属性(表里配置的属性)
|
||||
function this.GetHeroGiftAddOriginalPro(_id)
|
||||
local data={}
|
||||
if not this.allHeroGifts[_id] then
|
||||
LogError("英雄gift======================nil")
|
||||
return data
|
||||
end
|
||||
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
|
||||
--HeroGitUp
|
||||
local list=this.allHeroGifts[_id]
|
||||
|
||||
for i=1,#list do
|
||||
local id=list[i]
|
||||
local pro = equipConfig[id].Property
|
||||
if pro and #pro>0 then
|
||||
for k = 1, #pro do
|
||||
local key=pro[k][1]
|
||||
local value=pro[k][2]
|
||||
if tonumber(key)~=0 and tonumber(key)~=nil then
|
||||
if not data[key] then
|
||||
data[key] = 0
|
||||
end
|
||||
data[key] = data[key] + value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--英雄礼物不会加成主角属性
|
||||
-- local pro2 = equipConfig[id].PlayerProperty
|
||||
-- if pro2 and #pro2>0 then
|
||||
-- for k = 1, #pro2 do
|
||||
-- if not data[pro2[k][1]] then
|
||||
-- data[pro2[k][1]] = 0
|
||||
-- end
|
||||
-- data[pro2[k][1]] = data[pro2[k][1]] + pro2[k][2]
|
||||
-- end
|
||||
-- end
|
||||
end
|
||||
|
||||
return data
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--检测英雄红点
|
||||
function this.CheckRoleRedPointById(_id)
|
||||
local isOpen=CheckFunctionOpen(FUNCTION_OPEN_TYPE.Gift)
|
||||
|
|
|
|||
|
|
@ -355,7 +355,9 @@ function RewardEquipSingleShowPopup2:OnShow()
|
|||
if prop[2] > 0 then
|
||||
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())
|
||||
vText.text = "+"..GetPropertyFormatStr(proConfigData.Style, prop[2])..
|
||||
string.format(" 主角礼物加成+%s (%s%%)",math.floor(prop[2]*GiftManager.GetPlayerGiftAdd()/100),GiftManager.GetPlayerGiftAdd())
|
||||
..string.format(" 特训加成+%s (%s%%)",math.floor(prop[2]*HeroManager.ReturnGiftAtt()),HeroManager.ReturnGiftAtt())
|
||||
elseif equipConfigData.Position<=4 and self.curHeroData then
|
||||
local potencyAdd=HeroManager.GetHeroPotencyAddByType(self.curHeroData.dynamicId,equipConfigData.Position)
|
||||
LogError("potencyAdd============"..potencyAdd)
|
||||
|
|
|
|||
|
|
@ -265,6 +265,7 @@ function this.RefreshWindowData()
|
|||
|
||||
local proList=IncarnationManager.GetproDesLst(GiftManager.GetHeroGiftAddPro(curHeroData.dynamicId),"00FF00")
|
||||
table.insert(proList,string.format("神将潜能等级+%s",GiftManager.GetHeroGiftAddPotencyLv(curHeroData.dynamicId)))
|
||||
local originalList=GiftManager.GetHeroGiftAddOriginalPro(curHeroData.dynamicId)
|
||||
if proList and #proList>0 then
|
||||
this.proGrid:SetActive(true)
|
||||
this.proEmptyObj:SetActive(false)
|
||||
|
|
@ -279,7 +280,10 @@ function this.RefreshWindowData()
|
|||
for i=1,len do
|
||||
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]..string.format("(主角礼物加成%s%%)",GiftManager.GetPlayerGiftAdd())
|
||||
LogError("originalList[i]======================"..originalList[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())
|
||||
..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]
|
||||
|
|
|
|||
Loading…
Reference in New Issue