From 79d3af13900f3b4b31728dc482b7494a976727ec Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Tue, 2 Jan 2024 18:53:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E5=AF=B9=E5=A1=94=E7=A7=98=E5=AE=9D?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E7=89=B9=E8=AE=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 452a77ea17c63ab0cea94ae718835e356f76cdf5) --- .../Modules/MonsterCamp/GodsWayTowerPanel.lua | 7 ++++ .../RoleInfo/SpecailTrainingInfoPopup.lua | 42 +++++++++++++++++-- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/GodsWayTowerPanel.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/GodsWayTowerPanel.lua index 03a271655c..ea06f9b622 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/GodsWayTowerPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/GodsWayTowerPanel.lua @@ -215,6 +215,13 @@ function GodsWayTowerPanel:OnShow() -- return -- end curFloor=GodsWayTowerManager.GetTowerFloorByType(curType) + local curId=0 + if curType==1 then + curId=ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.godsWayTowerTreasure_two) + else + curId=ActivityGiftManager.GetActivityIdByType(ActivityTypeDef.godsWayTowerTreasure_three) + end + this.btnHelpFight:SetActive(curId~=0) this.moppingUpBtn:SetActive(curFloor~=0) storeDataId,itemId,costNum = GodsWayTowerManager.GetCost(curType) if curType==1 then diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/SpecailTrainingInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/SpecailTrainingInfoPopup.lua index 564654e83e..d5656daf96 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/SpecailTrainingInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/SpecailTrainingInfoPopup.lua @@ -333,11 +333,45 @@ function SpecailTrainingInfoPopup:SetSingleData(index,_go,_data) local magicSoldierIds={} magicSoldierIds[1]="" NetManager.TrainingUnlockSkillRequest( self._curHerodata.dynamicId,tData.Id,pokemenons,nil,TrainingUnlockSkillHeroItem,item,function (msg) - UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1) - if pokemenons and #pokemenons>0 then + UIManager.OpenPanel(UIName.RewardItemPopup, msg.drop, 1) + if #TrainingUnlockSkillHeroItem>0 then + local t={} + for i=1 ,#TrainingUnlockSkillHeroItem do + t[i]=TrainingUnlockSkillHeroItem[i].id + end + HeroManager.DeleteHeroDatas(t) + end + + if pokemenons and #pokemenons>0 then PokemonManager.RemovePokemonData(pokemenons) - end - end) + end + if self.OpenType==1 then + if CheckListIsContainValue1(self._curHerodata.HeroTraining.unlockIds,tData.Id) then + Chose:SetActive(false) + tip2:SetActive(true) + else + Chose:SetActive(true) + tip2:SetActive(false) + end + else + if CheckListIsContainValue1(self._curHerodata.HeroTraining.unlockIds,tData.Id) then + Chose:SetActive(false) + tip2:SetActive(true) + localContent:SetActive(true) + skillBtn:SetActive(true) + else + Chose:SetActive(true) + tip2:SetActive(false) + localContent:SetActive(false) + skillBtn:SetActive(false) + end + end + self.ScrollView:SetData(self.showList, function(index, go) + self:SetSingleData(index,go,self.showList[index]) + end) + ForceRebuildLayout(_go.transform) + ForceRebuildLayout(self.GameObject.transform) + end) end end )