【ID1010233】

【宝物详情优化】在装备界面和情报界面增加宝物共鸣属性显示
dev_chengFeng
jiaoyangna 2021-09-08 11:11:30 +08:00
parent a012ece114
commit b1b0bf1cab
2 changed files with 20 additions and 15 deletions

View File

@ -660,7 +660,7 @@ function this.ShowHeroEquip()
elseif jewerConfig.Location == 2 then elseif jewerConfig.Location == 2 then
pos = 6 pos = 6
end end
UIManager.OpenPanel(UIName.RoleEquipTreasureChangePopup,this,2,curHeroData,curEquipTreasureDatas[index],nil,pos) UIManager.OpenPanel(UIName.RoleEquipTreasureChangePopup,this,2,curHeroData,curEquipTreasureDatas[i],nil,pos)
end end
end end
end end

View File

@ -208,7 +208,6 @@ function RoleEquipTreasureChangePopup:OnOpen(_openThisPanel,_type,_curHeroData,_
isShowBtn = _isShowBtn isShowBtn = _isShowBtn
end end
function RoleEquipTreasureChangePopup:OnShow() function RoleEquipTreasureChangePopup:OnShow()
Log("openType:"..tostring(type))
--初始化 --初始化
for i = 1, 2 do for i = 1, 2 do
this.treasurePanel[i].bg:SetActive(false) this.treasurePanel[i].bg:SetActive(false)
@ -377,15 +376,7 @@ function this.ShowEquipData(i)
local baseInfo = EquipTreasureManager.GetCurLvPropertyValue(1,equipData[i].levelPool,equipData[i].lv) local baseInfo = EquipTreasureManager.GetCurLvPropertyValue(1,equipData[i].levelPool,equipData[i].lv)
this.treasurePanel[i].BaseAttriNum.text = string.format("[强化等级:%s/%s]",equipData[i].lv,equipData[i].maxLv) this.treasurePanel[i].BaseAttriNum.text = string.format("[强化等级:%s/%s]",equipData[i].lv,equipData[i].maxLv)
this.SetPropertyShow1(baseInfo,this.BasePropertyList[i],this.treasurePanel[i].BaseAttriGrid) this.SetPropertyShow1(baseInfo,this.BasePropertyList[i],this.treasurePanel[i].BaseAttriGrid)
if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" then
this.treasurePanel[i].strongAttri.gameObject:SetActive(false)
this.treasurePanel[i].refineMasterAttri:SetActive(false)
else
--强化共鸣
this.GongMingSetData(1,this.strongPropertyList[i],this.treasurePanel[i].strongAttriGrid,this.treasurePanel[i].strongAttriNum,this.treasurePanel[i].strongAttri)
--精炼共鸣
this.GongMingSetData(2,this.RefineMonsterPropertyList[i],this.treasurePanel[i].refineMasterAttriGrid,this.treasurePanel[i].refineMasterAttriNum,this.treasurePanel[i].refineMasterAttri)
end
--(精炼属性) --(精炼属性)
local refineInfo = EquipTreasureManager.GetCurLvPropertyValue(2,equipData[i].refinePool,equipData[i].refineLv,true) local refineInfo = EquipTreasureManager.GetCurLvPropertyValue(2,equipData[i].refinePool,equipData[i].refineLv,true)
this.treasurePanel[i].RefineAttriNum.text = string.format("[精炼等级:%s/%s]",equipData[i].refineLv,equipData[i].maxRefineLv) this.treasurePanel[i].RefineAttriNum.text = string.format("[精炼等级:%s/%s]",equipData[i].refineLv,equipData[i].maxRefineLv)
@ -393,9 +384,18 @@ function this.ShowEquipData(i)
this.treasurePanel[i].RefineAttri:SetActive(false) this.treasurePanel[i].RefineAttri:SetActive(false)
else else
this.treasurePanel[i].RefineAttri:SetActive(true) this.treasurePanel[i].RefineAttri:SetActive(true)
this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,589) this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,250)
this.SetPropertyShow1(refineInfo,this.RefinePropertyList[i],this.treasurePanel[i].RefineAttriGrid) this.SetPropertyShow1(refineInfo,this.RefinePropertyList[i],this.treasurePanel[i].RefineAttriGrid)
end end
if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" then
this.treasurePanel[i].strongAttri.gameObject:SetActive(false)
this.treasurePanel[i].refineMasterAttri:SetActive(false)
else
--强化共鸣
this.GongMingSetData(1,this.strongPropertyList[i],this.treasurePanel[i].strongAttriGrid,this.treasurePanel[i].strongAttriNum,this.treasurePanel[i].strongAttri,i)
--精炼共鸣
this.GongMingSetData(2,this.RefineMonsterPropertyList[i],this.treasurePanel[i].refineMasterAttriGrid,this.treasurePanel[i].refineMasterAttriNum,this.treasurePanel[i].refineMasterAttri,i)
end
--(神应属性) --(神应属性)
-- local treeInfo=SacredTreeManager.GetCurLvPropertyValue(3,equipData[i].treePool,equipData[i].treeLv or 0) -- local treeInfo=SacredTreeManager.GetCurLvPropertyValue(3,equipData[i].treePool,equipData[i].treeLv or 0)
-- this.treasurePanel[i].TreeAttriNum.text = string.format("[神应等级:%s/%s]",equipData[i].treeLv,equipData[i].maxTreeLv) -- this.treasurePanel[i].TreeAttriNum.text = string.format("[神应等级:%s/%s]",equipData[i].treeLv,equipData[i].maxTreeLv)
@ -403,7 +403,9 @@ function this.ShowEquipData(i)
-- this.treasurePanel[i].TreeAttri:SetActive(false) -- this.treasurePanel[i].TreeAttri:SetActive(false)
-- else -- else
-- this.treasurePanel[i].TreeAttri:SetActive(true) -- this.treasurePanel[i].TreeAttri:SetActive(true)
-- this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,589) -- local vec = this.treasurePanel[index].bgScroll:GetComponent("RectTransform").sizeDelta
-- vec.y = vec.y + 100
-- this.treasurePanel[index].bgScroll:GetComponent("RectTransform").sizeDelta = vec
-- this.SetPropertyShow2(treeInfo,this.TreePropertyList[i],this.treasurePanel[i].TreeAttriGrid,this.TreePropertyList2[i]) -- this.SetPropertyShow2(treeInfo,this.TreePropertyList[i],this.treasurePanel[i].TreeAttriGrid,this.TreePropertyList2[i])
-- end -- end
if i == 1 then if i == 1 then
@ -413,7 +415,7 @@ function this.ShowEquipData(i)
end end
function this.GongMingSetData(curTabIndex,proPreList,grid,title,go) function this.GongMingSetData(curTabIndex,proPreList,grid,title,go,index)
--获取穿戴宝物强化/精炼的最小等级 --获取穿戴宝物强化/精炼的最小等级
local minLv--最小等级 local minLv--最小等级
local maxlv --最大等级 local maxlv --最大等级
@ -423,7 +425,7 @@ function this.GongMingSetData(curTabIndex,proPreList,grid,title,go)
end end
go.gameObject:SetActive(true) go.gameObject:SetActive(true)
for i = 1, #curHeroData.jewels do for i = 1, #curHeroData.jewels do
local curEquipTreasureData = EquipTreasureManager.GetTreasureData(curHeroData.jewels[i]) local curEquipTreasureData = EquipTreasureManager.GetSingleTreasureByIdDyn(curHeroData.jewels[i])
if curTabIndex == 1 then if curTabIndex == 1 then
if minLv then if minLv then
if curEquipTreasureData.lv < minLv then if curEquipTreasureData.lv < minLv then
@ -477,6 +479,9 @@ function this.GongMingSetData(curTabIndex,proPreList,grid,title,go)
go.gameObject:SetActive(false) go.gameObject:SetActive(false)
return return
end end
local vec = this.treasurePanel[index].bgScroll:GetComponent("RectTransform").sizeDelta
vec.y = vec.y + 100
this.treasurePanel[index].bgScroll:GetComponent("RectTransform").sizeDelta = vec
go.gameObject:SetActive(true) go.gameObject:SetActive(true)
if curTabIndex == 1 then if curTabIndex == 1 then
title.text = string.format("<color=#FE2F33>强化大师%s级</color>",curJewelResonanceConfig.SortId) title.text = string.format("<color=#FE2F33>强化大师%s级</color>",curJewelResonanceConfig.SortId)