stacking fix and refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-03-24 16:00:07 +01:00
parent 502383c657
commit d8c1e2fab7
6 changed files with 133 additions and 156 deletions
+5 -9
View File
@@ -239,15 +239,11 @@ end
function game_tooltip_hooks:SetAuctionSellItem()
local name, _, quantity, _, _, _ = GetAuctionSellItemInfo()
if name then
for bag = 0, 4 do
if GetBagName(bag) then
for slot = 1, GetContainerNumSlots(bag) do
local link = GetContainerItemLink(bag, slot)
if link and ({Aux.info.parse_hyperlink(link)})[5] == name then
private.extend_tooltip(GameTooltip, link, quantity)
return
end
end
for slot in Aux.util.inventory() do
local link = GetContainerItemLink(unpack(slot))
if link and ({Aux.info.parse_hyperlink(link)})[5] == name then
private.extend_tooltip(GameTooltip, link, quantity)
return
end
end
end