From 0b29a4b466558f8a89d13962ab3c42d42e8f89d6 Mon Sep 17 00:00:00 2001 From: BeniS Date: Wed, 13 Feb 2013 05:30:00 +1300 Subject: [PATCH] Fixed market selling 'amounts' --- modules/game_market/market.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/game_market/market.lua b/modules/game_market/market.lua index bd9fca05..ef08b309 100644 --- a/modules/game_market/market.lua +++ b/modules/game_market/market.lua @@ -412,7 +412,7 @@ local function openAmountWindow(callback, type, actionText) local max = selectedOffer[type]:getAmount(item:getId()) if type == MarketAction.Sell then - local depot = Market.depotContains() + local depot = Market.depotContains(item:getId()) if max > depot then max = depot end @@ -807,8 +807,10 @@ function Market.enableCreateOffer(enable) amountEdit:setEnabled(enable) anonymous:setEnabled(enable) createOfferButton:setEnabled(enable) + local prevAmountButton = marketOffersPanel:recursiveGetChildById('prevAmountButton') local nextAmountButton = marketOffersPanel:recursiveGetChildById('nextAmountButton') + prevAmountButton:setEnabled(enable) nextAmountButton:setEnabled(enable) end @@ -851,6 +853,7 @@ end function Market.refreshItemsWidget(selectItem) local selectItem = selectItem or 0 itemsPanel = browsePanel:recursiveGetChildById('itemsPanel') + local layout = itemsPanel:getLayout() layout:disableUpdates() @@ -1005,6 +1008,7 @@ function Market.createNewOffer() local piecePrice = piecePriceEdit:getValue() local totalPrice = totalPriceEdit:getValue() + local amount = amountEdit:getValue() local anonymous = anonymous:isChecked() and 1 or 0