【魂宝灵宝 重新初始化数据修改】
parent
dd84a4bd3f
commit
4c03ec543d
|
|
@ -386,7 +386,8 @@ function this:SetChooseId(id)
|
||||||
end
|
end
|
||||||
-- 设置、获取卸载的数据
|
-- 设置、获取卸载的数据
|
||||||
function this:SetMingListIndexData(index)
|
function this:SetMingListIndexData(index)
|
||||||
SelectId = HeroManager.GetSingleHeroData(this.hongmengHeroInfos[index].heroId).dynamicId
|
|
||||||
|
SelectId = this.hongmengHeroInfos[index].heroId
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -57,32 +57,34 @@ function HongMengUnLoadPanel:RemoveListener()
|
||||||
|
|
||||||
end
|
end
|
||||||
local dataAdditon = nil
|
local dataAdditon = nil
|
||||||
local LingDegree = -1
|
|
||||||
local HunDegree = -1
|
|
||||||
|
|
||||||
function HongMengUnLoadPanel:OnOpen(equipSId)
|
function HongMengUnLoadPanel:OnOpen(equipSId)
|
||||||
LogGreen("打开面板")
|
LogGreen("打开面板")
|
||||||
|
|
||||||
local data = HarmonyManager:GetUnLoadData()
|
local data = HarmonyManager:GetUnLoadData()
|
||||||
local temp_hero = HeroManager.GetSingleHeroData(data)
|
local temp_hero = HeroManager.GetSingleHeroData(data)
|
||||||
|
|
||||||
dataAdditon = HarmonyManager:GetAdditions()
|
dataAdditon = HarmonyManager:GetAdditions()
|
||||||
--print(data)
|
--print(data)
|
||||||
|
self.LingDegree = -1
|
||||||
|
self.HunDegree = -1
|
||||||
local dataRockOne = EquipTreasureManager.GetSingleTreasureByIdDyn(temp_hero.jewels[2])
|
local dataRockOne = EquipTreasureManager.GetSingleTreasureByIdDyn(temp_hero.jewels[2])
|
||||||
local dataRockTwo = EquipTreasureManager.GetSingleTreasureByIdDyn(temp_hero.jewels[1])
|
local dataRockTwo = EquipTreasureManager.GetSingleTreasureByIdDyn(temp_hero.jewels[1])
|
||||||
if dataRockOne then
|
if dataRockOne then
|
||||||
-- body
|
-- body
|
||||||
if dataRockOne.type == "魂宝" then
|
if dataRockOne.type == "魂宝" then
|
||||||
HunDegree = dataRockOne.oriLv
|
self.HunDegree = dataRockOne.oriLv
|
||||||
|
|
||||||
else
|
else
|
||||||
LingDegree = dataRockOne.oriLv
|
self.LingDegree = dataRockOne.oriLv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if dataRockTwo then
|
if dataRockTwo then
|
||||||
if dataRockTwo.type == "灵宝" then
|
if dataRockTwo.type == "灵宝" then
|
||||||
LingDegree = dataRockTwo.oriLv
|
self.LingDegree = dataRockTwo.oriLv
|
||||||
else
|
else
|
||||||
HunDegree = dataRockTwo.oriLv
|
self.HunDegree = dataRockTwo.oriLv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
this:SetItem(this.ItemOne,HarmonyManager:GetGongMingListSingle(data),0)
|
this:SetItem(this.ItemOne,HarmonyManager:GetGongMingListSingle(data),0)
|
||||||
|
|
@ -91,7 +93,7 @@ function HongMengUnLoadPanel:OnOpen(equipSId)
|
||||||
|
|
||||||
this:SetText(this.OneAll,HarmonyManager:GetGongMingListSingle(data))
|
this:SetText(this.OneAll,HarmonyManager:GetGongMingListSingle(data))
|
||||||
this:SetTextTwo(this.TwoAll,temp_hero)
|
this:SetTextTwo(this.TwoAll,temp_hero)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function HongMengUnLoadPanel:SetItem(go,data,index)
|
function HongMengUnLoadPanel:SetItem(go,data,index)
|
||||||
|
|
@ -130,16 +132,16 @@ function HongMengUnLoadPanel:SetTextTwo(go,data)
|
||||||
Util.GetGameObject(go.transform,"TextRank"):GetComponent("Text").text = string.format("%s%d星",GetQuantityStrByquality(equip.Quality),equip.Stars)
|
Util.GetGameObject(go.transform,"TextRank"):GetComponent("Text").text = string.format("%s%d星",GetQuantityStrByquality(equip.Quality),equip.Stars)
|
||||||
end
|
end
|
||||||
|
|
||||||
if HunDegree > 0 then
|
if self.HunDegree > 0 then
|
||||||
-- body
|
-- body
|
||||||
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",HunDegree)
|
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",self.HunDegree)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("无")
|
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("无")
|
||||||
end
|
end
|
||||||
|
|
||||||
if LingDegree > 0 then
|
if self.LingDegree > 0 then
|
||||||
-- body
|
-- body
|
||||||
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",LingDegree)
|
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",self.LingDegree)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("无")
|
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("无")
|
||||||
end
|
end
|
||||||
|
|
@ -160,13 +162,8 @@ function HongMengUnLoadPanel:SetTextTwo(go,data)
|
||||||
-- Util.GetGameObject(go.transform,"TextFa"):GetComponent("Text").text = string.format("%d",data.talismanList)
|
-- Util.GetGameObject(go.transform,"TextFa"):GetComponent("Text").text = string.format("%d",data.talismanList)
|
||||||
end
|
end
|
||||||
function HongMengUnLoadPanel:SetText(go,_data)
|
function HongMengUnLoadPanel:SetText(go,_data)
|
||||||
|
print(_data.heroConfig.ReadingName)
|
||||||
-- local dataRock = EquipTreasureManager.GetSingleTreasureByIdDyn(herodata.jewels[2])
|
|
||||||
-- local HunSoul = 0
|
|
||||||
-- if dataRock.type == "魂宝" then
|
|
||||||
|
|
||||||
-- else
|
|
||||||
-- end
|
|
||||||
for i = 1, #dataAdditon do
|
for i = 1, #dataAdditon do
|
||||||
if dataAdditon[i].additionType == 1 then
|
if dataAdditon[i].additionType == 1 then
|
||||||
if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then
|
if HarmonyManager.hongmengTablet>=HarmonyManager.TowerStartLimit then
|
||||||
|
|
@ -204,9 +201,9 @@ function HongMengUnLoadPanel:SetText(go,_data)
|
||||||
|
|
||||||
-- body
|
-- body
|
||||||
elseif dataAdditon[i].additionType == 3 then
|
elseif dataAdditon[i].additionType == 3 then
|
||||||
if dataAdditon[i].value > 0 and HunDegree ~= -1 then
|
if dataAdditon[i].value > 0 and self.HunDegree ~= -1 then
|
||||||
-- body
|
-- body
|
||||||
local grade = dataAdditon[i].value > HunDegree and dataAdditon[i].value or HunDegree
|
local grade = dataAdditon[i].value > self.HunDegree and dataAdditon[i].value or self.HunDegree
|
||||||
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",grade)
|
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",grade)
|
||||||
-- if EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[2]) then
|
-- if EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[2]) then
|
||||||
-- -- body
|
-- -- body
|
||||||
|
|
@ -216,11 +213,11 @@ function HongMengUnLoadPanel:SetText(go,_data)
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
else
|
else
|
||||||
if HunDegree > 0 then
|
if self.HunDegree > 0 then
|
||||||
-- body
|
-- body
|
||||||
|
|
||||||
--local grade = dataAdditon[i].value > EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[2]).lv and dataAdditon[i].value or EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[2]).lv
|
--local grade = dataAdditon[i].value > EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[2]).lv and dataAdditon[i].value or EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[2]).lv
|
||||||
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",HunDegree)
|
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",self.HunDegree)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("无")
|
Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("无")
|
||||||
end
|
end
|
||||||
|
|
@ -229,8 +226,8 @@ function HongMengUnLoadPanel:SetText(go,_data)
|
||||||
-- Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",data[i].value)
|
-- Util.GetGameObject(go.transform,"TextHun"):GetComponent("Text").text = string.format("%d",data[i].value)
|
||||||
-- body
|
-- body
|
||||||
elseif dataAdditon[i].additionType == 4 then
|
elseif dataAdditon[i].additionType == 4 then
|
||||||
if dataAdditon[i].value > 0 and LingDegree ~= -1 then
|
if dataAdditon[i].value > 0 and self.LingDegree ~= -1 then
|
||||||
local grade = dataAdditon[i].value > LingDegree and dataAdditon[i].value or LingDegree
|
local grade = dataAdditon[i].value > self.LingDegree and dataAdditon[i].value or self.LingDegree
|
||||||
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",grade)
|
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",grade)
|
||||||
-- if EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[1]) then
|
-- if EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[1]) then
|
||||||
-- -- body
|
-- -- body
|
||||||
|
|
@ -240,10 +237,10 @@ function HongMengUnLoadPanel:SetText(go,_data)
|
||||||
-- end
|
-- end
|
||||||
-- Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",data[i].value)
|
-- Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",data[i].value)
|
||||||
else
|
else
|
||||||
if LingDegree > 0 then
|
if self.LingDegree > 0 then
|
||||||
-- body
|
-- body
|
||||||
--local grade = dataAdditon[i].value > EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[1]).lv and dataAdditon[i].value or EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[1]).lv
|
--local grade = dataAdditon[i].value > EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[1]).lv and dataAdditon[i].value or EquipTreasureManager.GetSingleTreasureByIdDyn(_data.jewels[1]).lv
|
||||||
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",LingDegree)
|
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("%d",self.LingDegree)
|
||||||
else
|
else
|
||||||
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("无")
|
Util.GetGameObject(go.transform,"TextLing"):GetComponent("Text").text = string.format("无")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue