From ce4f88b61d33e39d16a050541506685889ce602d Mon Sep 17 00:00:00 2001 From: BeniS Date: Tue, 31 Jul 2012 22:45:41 +1200 Subject: [PATCH] Missed from last commit to fix offer creation with non stackable items. --- modules/game_market/market.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/game_market/market.lua b/modules/game_market/market.lua index 1aa5b0d3..f02bead7 100644 --- a/modules/game_market/market.lua +++ b/modules/game_market/market.lua @@ -361,7 +361,7 @@ local function updateDepotItemCount(itemId, amount) if depotItem.ptr:isStackable() then if depotItemCount <= 100 and depotItemCount >= amount then if (depotItemCount - amount) <= 0 then - table.remove(information.depotItems, i) + table.remove(information.depotItems, i) -- warning: this re-indexes else depotItem.ptr:setCount(depotItemCount - amount) information.depotItems[i] = depotItem @@ -384,13 +384,13 @@ local function updateDepotItemCount(itemId, amount) end else if amount > 0 then - table.remove(information.depotItems, i) + information.depotItems[i] = nil amount = amount - 1 end end end end - return false + return true end local function updateFee(price, amount)