auctionable test improvement
This commit is contained in:
+4
-3
@@ -263,12 +263,13 @@ function M.display_name(item_id, no_brackets, no_color)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.auctionable(tooltip, quality, lootable)
|
function M.auctionable(tooltip, quality, lootable)
|
||||||
|
local status = tooltip[2] and tooltip[2].left_text
|
||||||
local durability, max_durability = durability(tooltip)
|
local durability, max_durability = durability(tooltip)
|
||||||
return not lootable
|
return not lootable
|
||||||
and (not quality or quality < 6)
|
and (not quality or quality < 6)
|
||||||
and not tooltip_match(ITEM_BIND_ON_PICKUP, tooltip)
|
and status ~= ITEM_BIND_ON_PICKUP
|
||||||
and not tooltip_match(ITEM_BIND_QUEST, tooltip)
|
and status ~= ITEM_BIND_QUEST
|
||||||
and not tooltip_match(ITEM_SOULBOUND, tooltip)
|
and status ~= ITEM_SOULBOUND
|
||||||
and (not tooltip_match(ITEM_CONJURED, tooltip) or tooltip_find(ITEM_MIN_LEVEL, tooltip) > 1)
|
and (not tooltip_match(ITEM_CONJURED, tooltip) or tooltip_find(ITEM_MIN_LEVEL, tooltip) > 1)
|
||||||
and not (durability and durability < max_durability)
|
and not (durability and durability < max_durability)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user