diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua index 0e1dabc41a..3d9d43e3e3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua @@ -78,9 +78,20 @@ function BagPanel:BindEvent() end Util.AddClick(this.fenJieBtn, function() if sortIndex == ItemBaseType.Equip then - UIManager.OpenPanel(UIName.EquipSellSelectPopup)--宝器 + local temp = BagManager.GetBagItemDataByItemType(ItemBaseType.Equip) + if not temp or #temp < 1 then + PopupTipPanel.ShowTip("无可出售装备") + else + UIManager.OpenPanel(UIName.EquipSellSelectPopup)--宝器 + end + elseif sortIndex == ItemBaseType.SoulPrint then - UIManager.OpenPanel(UIName.HeroAndEquipResolvePanel, 4)--魂印 + local temp = BagManager.GetAllSoulPrintData() + if not temp or #temp < 1 then + PopupTipPanel.ShowTip("无可分解魂印") + else + UIManager.OpenPanel(UIName.HeroAndEquipResolvePanel, 4)--魂印 + end end end) @@ -135,7 +146,6 @@ function this:OnClickAllBtn() this:SetItemData(itemData) this.noneImage:SetActive(#itemData==0) - this.fenJieBtn:GetComponent("Button").enabled = not(#itemData==0) end function this.BagGoldChangeCallBackOnClickTabBtn() @@ -169,7 +179,6 @@ function this.OnClickTabBtn(_index, _clickBtn) this:SetItemData(itemData) end this.noneImage:SetActive(#itemData==0) - this.fenJieBtn:GetComponent("Button").enabled = not(#itemData==0) end --当魂印升级消耗时刷新背包数据