Missed from last commit to fix offer creation with non stackable items.

This commit is contained in:
BeniS 2012-07-31 22:45:41 +12:00
parent 82bfdc566f
commit ce4f88b61d
1 changed files with 3 additions and 3 deletions

View File

@ -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)