From 272aad034b013eab5513d9002bee2bfd99a744e1 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sun, 29 Jan 2017 17:04:50 +0100 Subject: [PATCH] auctionable test improvement --- util/info.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/util/info.lua b/util/info.lua index fdbb057..62cd3f2 100644 --- a/util/info.lua +++ b/util/info.lua @@ -263,12 +263,13 @@ function M.display_name(item_id, no_brackets, no_color) end function M.auctionable(tooltip, quality, lootable) + local status = tooltip[2] and tooltip[2].left_text local durability, max_durability = durability(tooltip) return not lootable and (not quality or quality < 6) - and not tooltip_match(ITEM_BIND_ON_PICKUP, tooltip) - and not tooltip_match(ITEM_BIND_QUEST, tooltip) - and not tooltip_match(ITEM_SOULBOUND, tooltip) + and status ~= ITEM_BIND_ON_PICKUP + and status ~= ITEM_BIND_QUEST + and status ~= ITEM_SOULBOUND and (not tooltip_match(ITEM_CONJURED, tooltip) or tooltip_find(ITEM_MIN_LEVEL, tooltip) > 1) and not (durability and durability < max_durability) end