Fix strict durability check
This commit is contained in:
+3
-3
@@ -269,16 +269,16 @@ end
|
||||
|
||||
function M.auctionable(tooltip, quality, strict)
|
||||
local status = tooltip[2] and tooltip[2].left_text
|
||||
local durability, max_durability
|
||||
local current_durability, max_durability
|
||||
if strict then
|
||||
durability, max_durability = durability(tooltip)
|
||||
current_durability, max_durability = durability(tooltip)
|
||||
end
|
||||
return (not quality or quality < 6)
|
||||
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 (strict and durability and durability < max_durability)
|
||||
and not (strict and current_durability and current_durability < max_durability)
|
||||
end
|
||||
|
||||
function M.tooltip(setter, arg1, arg2)
|
||||
|
||||
Reference in New Issue
Block a user