Missed from last commit to fix offer creation with non stackable items.
This commit is contained in:
parent
82bfdc566f
commit
ce4f88b61d
|
@ -361,7 +361,7 @@ local function updateDepotItemCount(itemId, amount)
|
||||||
if depotItem.ptr:isStackable() then
|
if depotItem.ptr:isStackable() then
|
||||||
if depotItemCount <= 100 and depotItemCount >= amount then
|
if depotItemCount <= 100 and depotItemCount >= amount then
|
||||||
if (depotItemCount - amount) <= 0 then
|
if (depotItemCount - amount) <= 0 then
|
||||||
table.remove(information.depotItems, i)
|
table.remove(information.depotItems, i) -- warning: this re-indexes
|
||||||
else
|
else
|
||||||
depotItem.ptr:setCount(depotItemCount - amount)
|
depotItem.ptr:setCount(depotItemCount - amount)
|
||||||
information.depotItems[i] = depotItem
|
information.depotItems[i] = depotItem
|
||||||
|
@ -384,13 +384,13 @@ local function updateDepotItemCount(itemId, amount)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if amount > 0 then
|
if amount > 0 then
|
||||||
table.remove(information.depotItems, i)
|
information.depotItems[i] = nil
|
||||||
amount = amount - 1
|
amount = amount - 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local function updateFee(price, amount)
|
local function updateFee(price, amount)
|
||||||
|
|
Loading…
Reference in New Issue