From 91f95890433dc0e289a0179174fffb69ae8859cf Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Mon, 17 Jan 2022 10:33:42 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=91=98=E6=98=9F=E9=98=81=E3=80=91?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Popup/RewardEquipSingleShowPopup2.lua | 46 +++++++------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua index fd210f6a31..aa25c274a9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua @@ -284,22 +284,6 @@ function RewardEquipSingleShowPopup2:OnShow() else vText.text = GetPropertyFormatStr(proConfigData.Style, prop[2]) end - --摘星阁加持 - -- if self.equipData.homeEquipLv and self.equipData.homeEquipLv[1] > 0 and proConfigData.Style == 1 then - -- local num = HomeLandManager.LevelToValue(self.equipData.homeEquipLv,self.equipData.position) - -- -- hText.text = string.format("(摘星阁加持:%s",num).."%)" - -- local power = math.ceil(prop[2]*(num/100)) - - -- if not _specialAttri then - -- _specialAttri = newObjToParent(self.baseProPre, self.baseProGrid) - -- end - -- _specialAttri:SetActive(true) - -- _specialAttri:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info) - -- local sText = Util.GetGameObject(_specialAttri, "curProVale"):GetComponent("Text") - -- sText.text = "+"..GetPropertyFormatStr(proConfigData.Style, power) - -- Util.GetGameObject(sText.gameObject, "homeValue"):GetComponent("Text").text = string.format("(摘星阁加持:%s",num).."%)"--摘星阁加持文字显示位置 - - -- end end end else @@ -307,24 +291,26 @@ function RewardEquipSingleShowPopup2:OnShow() end --homePro基础属性 - if equipConfigData.Property then + if self.equipData.homeEquipLv and self.equipData.homeEquipLv[1] > 0 and self.curHeroData then + self.homePro:SetActive(true) for _, pro in ipairs(_homeProList) do pro:SetActive(false) end - for index, prop in ipairs(equipConfigData.Property) do - local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1]) - if proConfigData and self.equipData.homeEquipLv and self.equipData.homeEquipLv[1] > 0 and proConfigData.Style == 1 then - self.homePro:SetActive(true) - local num = HomeLandManager.LevelToValue(self.equipData.homeEquipLv,self.equipData.position) - local power = math.ceil(prop[2]*(num/100)) - if not _homeProList[index] then - _homeProList[index] = newObjToParent(self.homeProPre, self.homeProGrid) + if equipConfigData.Property then + for index, prop in ipairs(equipConfigData.Property) do + local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, prop[1]) + if proConfigData and proConfigData.Style == 1 then + local num = HomeLandManager.LevelToValue(self.equipData.homeEquipLv,self.equipData.position) + local power = math.ceil(prop[2]*(num/100)) + if not _homeProList[index] then + _homeProList[index] = newObjToParent(self.homeProPre, self.homeProGrid) + end + _homeProList[index]:SetActive(true) + _homeProList[index]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info) + local sText = Util.GetGameObject(_homeProList[index], "curProVale"):GetComponent("Text") + sText.text = "+"..GetPropertyFormatStr(proConfigData.Style, power) + Util.GetGameObject(sText.gameObject, "homeValue"):GetComponent("Text").text = string.format("(摘星阁加持:%s",num).."%)"--摘星阁加持文字显示位置 end - _homeProList[index]:SetActive(true) - _homeProList[index]:GetComponent("Text").text = GetLanguageStrById(proConfigData.Info) - local sText = Util.GetGameObject(_homeProList[index], "curProVale"):GetComponent("Text") - sText.text = "+"..GetPropertyFormatStr(proConfigData.Style, power) - Util.GetGameObject(sText.gameObject, "homeValue"):GetComponent("Text").text = string.format("(摘星阁加持:%s",num).."%)"--摘星阁加持文字显示位置 end end else