vendor filters

This commit is contained in:
Manuel Simon Hirsig
2016-03-20 19:20:54 +01:00
parent 83c9ba5bdb
commit 0a4b9c4eb6
7 changed files with 70 additions and 18 deletions
+17 -1
View File
@@ -62,7 +62,6 @@ function private.extend_tooltip(tooltip, hyperlink, quantity)
end
local item_info = Aux.info.item(item_id)
if item_info then
local distribution = Aux.disenchant.distribution(item_info.slot, item_info.quality, item_info.level)
@@ -87,6 +86,23 @@ function private.extend_tooltip(tooltip, hyperlink, quantity)
end
end
if aux_tooltip_vendor_buy then
local color = {r=0.8, g=0.5, b=0.1}
local _, price, limited = Aux.merchant.info(item_id)
if price then
tooltip:AddLine('Vendor Buy '..(limited and '(limited): ' or ': ')..Aux.util.format_money(price), color.r, color.g, color.b)
end
end
if aux_tooltip_vendor_sell then
local color = {r=0.8, g=0.5, b=0.1}
local price = Aux.merchant.info(item_id)
if price then
tooltip:AddLine('Vendor Sell: '..Aux.util.format_money(price), color.r, color.g, color.b)
end
end
local item_key = (item_id or 0)..':'..(suffix_id or 0)
local value = Aux.history.value(item_key)