修复
This commit is contained in:
parent
630326bda3
commit
c03e46432f
@ -19,9 +19,9 @@ function CommonExchangeUI:ctor(params)
|
||||
local num = DataManager.BagData.ItemData:getItemNumById(costId)
|
||||
local maxBuyCount = num // costNum
|
||||
self.remainNum = math.min(self.remainNum, maxBuyCount)
|
||||
if self.remainNum <= 0 then
|
||||
self.remainNum = 1
|
||||
end
|
||||
-- if self.remainNum <= 0 then
|
||||
-- self.remainNum = 1
|
||||
-- end
|
||||
end
|
||||
|
||||
function CommonExchangeUI:getPrefabPath()
|
||||
@ -75,6 +75,10 @@ end
|
||||
function CommonExchangeUI:_addListeners()
|
||||
local uiMap = self.root:genAllChildren()
|
||||
uiMap["exchange_ui.bg.ok_btn"]:addClickListener(function()
|
||||
if self.defaultNum <= 0 then
|
||||
return
|
||||
end
|
||||
|
||||
if self.callback then
|
||||
self.callback(self.defaultNum)
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user