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 )