Minor quantity fix from previous commit

This commit is contained in:
BeniS 2013-02-21 00:28:45 +13:00
parent f4c7d98bd5
commit 3b91c4d509
1 changed files with 12 additions and 9 deletions

View File

@ -488,9 +488,11 @@ function checkSellAllTooltip()
local first = true local first = true
for key, amount in pairs(playerItems) do for key, amount in pairs(playerItems) do
if amount > 0 then
local data = getTradeItemData(key, SELL) local data = getTradeItemData(key, SELL)
if data and canTradeItem(data) then if data then
amount = getSellQuantity(data.ptr)
if amount > 0 then
if data and amount > 0 then
info = info..(not first and "\n" or "").. info = info..(not first and "\n" or "")..
amount.." ".. amount.." "..
data.name.." (".. data.name.." ("..
@ -501,6 +503,7 @@ function checkSellAllTooltip()
end end
end end
end end
end
if info ~= '' then if info ~= '' then
info = info.."\nTotal: "..total.." gold" info = info.."\nTotal: "..total.." gold"
sellAllButton:setTooltip(info) sellAllButton:setTooltip(info)