auctionable test improvement

This commit is contained in:
Manuel Simon Hirsig
2017-01-29 17:04:50 +01:00
parent 4663c0147a
commit 272aad034b
+4 -3
View File
@@ -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