多对塔秘宝修改 特训修改

(cherry picked from commit 452a77ea17)
tcx_xiyou_test
wangzhenxing 2024-01-02 18:53:14 +08:00
parent 5507673520
commit 79d3af1390
2 changed files with 45 additions and 4 deletions

View File

@ -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

View File

@ -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
)