diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index 4d79f3a345..a16cd32ed9 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -380,8 +380,7 @@ function RoleInfoPanel:OnShow() this.rightLiveObj = HeroManager.LoadHerolive(rightHeroData,this.rightObj) this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj) - local t=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",curHeroData.id) - this.trainingBtn:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) and #t~=0) + local leftToward=0 if leftHeroData.skinId and leftHeroData.skinId~=0 then local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId) @@ -741,6 +740,8 @@ function this:UpdateHeroInfoData() this.GodSoulBtn.gameObject:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.shenhun) and curHeroData.heroConfig.IsSoulOpen) this.potencyObj:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Potency)) this.giftBtn.gameObject:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Gift)) + local t=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",curHeroData.id) + this.trainingBtn:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) and #t~=0) for k,v in pairs(this.PageList) do v:OnHide() end