From bb43d526b2f83324819ab1638351fa02b9cede86 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 2 Sep 2020 14:47:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=83=8C=E5=8C=85=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91=E6=97=A0=E5=8F=AF=E5=88=86=E8=A7=A3=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E5=92=8C=E9=AD=82=E5=8D=B0=E6=97=B6=E6=B7=BB=E5=8A=A0=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Bag/BagPanel.lua | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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 --当魂印升级消耗时刷新背包数据