【装备】出售单个装备报错修改

dev_chengFeng
ZhangBiao 2021-12-01 10:16:42 +08:00
parent ed655ea6a7
commit 1805fe0848
1 changed files with 25 additions and 1 deletions

View File

@ -98,7 +98,7 @@ function RewardEquipSingleShowPopup2:BindEvent()
table.insert(curResolveAllItemList,equip)
local type = 1
NetManager.UseAndPriceItemRequest(type,curResolveAllItemList,function (drop)
self.SendBackResolveReCallBack(drop)
self:SendBackResolveReCallBack(drop)
end)
end
else
@ -141,6 +141,30 @@ function RewardEquipSingleShowPopup2:BindEvent()
end)
end
--道具 和 装备分解 发送请求后 回调
function RewardEquipSingleShowPopup2:SendBackResolveReCallBack(drop)
local isShowReward=false
if drop.itemlist~=nil and #drop.itemlist>0 then
for i = 1, #drop.itemlist do
if drop.itemlist[i].itemNum>0 then
isShowReward=true
break
end
end
end
if isShowReward then
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function ()
BagManager.OnShowTipDropNumZero(drop)
end)
else
BagManager.OnShowTipDropNumZero(drop)
end
if self.func then
self.func()
end
self:ClosePanel()
end
--添加事件监听(用于子类重写)
function RewardEquipSingleShowPopup2:AddListener()