【合成优化修改】

dev_chengFeng
guowei 2020-12-24 15:03:14 +08:00
parent 8376d74230
commit f25f253479
1 changed files with 3 additions and 2 deletions

View File

@ -45,12 +45,13 @@ function RewardItemSingleShowPopup:BindEvent()
end) end)
Util.AddClick(this.btnSure, function() Util.AddClick(this.btnSure, function()
if itemConfigData.ItemType == ItemType.HeroDebris then if itemConfigData.ItemType == ItemType.HeroDebris then
if BagManager.GetItemCountById(itemSid) > BagManager.bagDatas[itemSid].itemConfig.UsePerCount then local sum = BagManager.GetItemCountById(itemSid) / BagManager.bagDatas[itemSid].itemConfig.UsePerCount
if sum >= 2 then
local _itemData = BagManager.bagDatas[itemSid] local _itemData = BagManager.bagDatas[itemSid]
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function() UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
func() func()
end) end)
elseif BagManager.GetItemCountById(itemSid) == BagManager.bagDatas[itemSid].itemConfig.UsePerCount then elseif sum >= 1 and sum < 2 then
-- body -- body
local compoundNum = 1 local compoundNum = 1
local _itemData = BagManager.bagDatas[itemSid] local _itemData = BagManager.bagDatas[itemSid]