From efb714863ed0a2ca3e07701c8b44885ac694ee0d Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1545929779@qq.com> Date: Mon, 1 Apr 2024 15:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=85=B5=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Fight/FightPointPassMainPanel.lua | 36 +++++-------------- .../Modules/Gem/SmallSoldierInfoPanel.lua | 3 ++ .../Modules/Gem/SmallSoldierLvInfoPanel.lua | 17 ++++++--- 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua index aeacdd52a1..d7d1d35876 100644 --- a/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Fight/FightPointPassMainPanel.lua @@ -425,6 +425,7 @@ function this.RefreshBossInfo() local nextBossLv=0 local curFight=FightPointPassManager.curOpenFight local name="" + local nextLv=0 LogError("刷星boss显示 curfight==========================================================="..curFight) for k,v in ConfigPairs(fightLevelConfig) do local aa=v @@ -435,36 +436,17 @@ function this.RefreshBossInfo() name=aa.Name end table.insert(levelList,k) - - end - if FightPointPassManager.soldierLayerId < aa.OpenRule[1][2] then - if nextBossLv==0 then - nextBossLv=aa.OpenRule[1][2] - name=aa.Name - --break - end + nextLv=v.NextLevel end end end - for k,v in ConfigPairs(fightLevelConfig) do - local aa=v - if k>=curFight then - if aa.OpenRule and (aa.OpenRule[1][1]==9 or aa.OpenRule[1][1]==0 ) and FightPointPassManager.soldierLayerId>=aa.OpenRule[1][2] then - --LogError("k==================================="..k) - if name=="" then - name=aa.Name - end - table.insert(levelList,k) - - end - if FightPointPassManager.soldierLayerId < aa.OpenRule[1][2] then - if nextBossLv==0 then - nextBossLv=aa.OpenRule[1][2] - name=aa.Name - --break - end - end - end + if nextLv==0 then + nextLv=curFight + end + local nextConfig=ConfigManager.GetConfigData(ConfigName.MainLevelConfig,nextLv) + if nextConfig then + nextBossLv=nextConfig.OpenRule[1][2] + name=nextConfig.Name end LogError("nextBossLv====================="..nextBossLv) if #levelList>0 then diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua index 3ba8d970f2..ce7ce5e34c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierInfoPanel.lua @@ -222,7 +222,10 @@ function SmallSoldierInfoPanel:ShwoSoliderInfo(go,data,_type) end end if imgStr then + img.gameObject:SetActive(true) img.sprite=self.spLoader:LoadSprite(imgStr) + else + img.gameObject:SetActive(false) end addDamage=addDamage+(newData.attributes[i].value-oldData.attributes[i].value)*propertyConfig[i].Score else diff --git a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua index 0cc2d99a8b..6d28ffcc0d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Gem/SmallSoldierLvInfoPanel.lua @@ -120,9 +120,10 @@ function SmallSoldierLvInfoPanel:OnShow() local lotteryData={} curConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,curLv) - local nextConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,nextLv) + local nextConfig=ConfigManager.TryGetConfigData(ConfigName.SoldiersLotteryConfig,nextLv) if nextConfig==nil then nextConfig=curConfig + self.nextlv.text="下一等级:"..curLv end local qua=0 @@ -145,9 +146,17 @@ function SmallSoldierLvInfoPanel:OnShow() data.rightData.pro=nextConfig.Show[i][2]/100 .."%" table.insert(lotteryData,data) end - LogError("GetResourcePath(curConfig.Consume[1])=="..GetResourcePath(curConfig.Consume[1]).." "..curConfig.Consume[1]) - self.costImg.sprite=SetIcon(self.spLoader, curConfig.Consume[1]) --self.spLoader:LoadSprite(GetResourcePath(curConfig.Consume[1])) - self.costTxt.text=curConfig.Consume[2] + --LogError("GetResourcePath(curConfig.Consume[1])=="..GetResourcePath(curConfig.Consume[1]).." "..curConfig.Consume[1]) + --self.spLoader:LoadSprite(GetResourcePath(curConfig.Consume[1])) + if curConfig.Consume and type(curConfig.Consume[1])~="userdata" then + self.costImg.gameObject:SetActive(true) + self.costTxt.gameObject:SetActive(true) + self.costImg.sprite=SetIcon(self.spLoader, curConfig.Consume[1]) + self.costTxt.text=curConfig.Consume[2] + else + self.costImg.gameObject:SetActive(false) + self.costTxt.gameObject:SetActive(false) + end self.skipObj:SetActive(SmallSoldierManager.upEndTime>0) self.upObj:SetActive(SmallSoldierManager.upEndTime==0) self.skipCostImg.sprite=SetIcon(self.spLoader,tonumber(aaa[1])) --self.spLoader:LoadSprite(GetResourcePath(tonumber(aaa[1])))