From fcb2e4604abae65c2280fb12b94f7618f9c1ae3a Mon Sep 17 00:00:00 2001 From: guowei Date: Tue, 22 Dec 2020 20:41:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Popup/RewardItemSingleShowPopup.lua | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua index 36f21a7481..025ee27f1d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua @@ -45,11 +45,27 @@ function RewardItemSingleShowPopup:BindEvent() end) Util.AddClick(this.btnSure, function() if itemConfigData.ItemType == ItemType.HeroDebris then - if BagManager.GetItemCountById(itemSid) >= BagManager.bagDatas[itemSid].itemConfig.UsePerCount then + if BagManager.GetItemCountById(itemSid) > BagManager.bagDatas[itemSid].itemConfig.UsePerCount then local _itemData = BagManager.bagDatas[itemSid] UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function() func() end) + elseif BagManager.GetItemCountById(itemSid) == BagManager.bagDatas[itemSid].itemConfig.UsePerCount then + -- body + local compoundNum = 1 + local _itemData = BagManager.bagDatas[itemSid] + local item={} + item.itemId= _itemData.id + item.itemNum=compoundNum*_itemData.itemConfig.UsePerCount + Log("sssssssssssssss "..item.itemId.." "..item.itemNum) + NetManager.HeroComposeRequest(item,function (drop) + this.SendBackCompoundReCallBack(drop) + end) + if compoundNum>0 then + + else + PopupTipPanel.ShowTip(Language[10200]) + end else PopupTipPanel.ShowTip(Language[11592]) end @@ -118,6 +134,20 @@ function RewardItemSingleShowPopup:BindEvent() end end) end +local callBackFun +function this.SendBackCompoundReCallBack(drop) + --this:ClosePanel() + UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function () + --UIManager.OpenPanel(UIName.BagPanel) + -- if callBackFun then + -- callBackFun() + func() + -- end + end,nil,nil,nil,true) + --改为后端刷新了 + --BagManager.UpdateItemsNum(itemData.id,compoundNum*itemData.itemConfig.UsePerCount) +end + --扣除解锁蓝图材料 并数据 function this.DeleteActiveLanTuData() PopupTipPanel.ShowTip(Language[11593] .. itemConfigData.Name)