【优化】提交
parent
a0f059ca9b
commit
fcb2e4604a
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue