Fix strict durability check

This commit is contained in:
Dusk-92
2026-09-05 21:35:37 +02:00
parent 77e3b6da28
commit eb53d9f680
+3 -3
View File
@@ -269,16 +269,16 @@ end
function M.auctionable(tooltip, quality, strict) function M.auctionable(tooltip, quality, strict)
local status = tooltip[2] and tooltip[2].left_text local status = tooltip[2] and tooltip[2].left_text
local durability, max_durability local current_durability, max_durability
if strict then if strict then
durability, max_durability = durability(tooltip) current_durability, max_durability = durability(tooltip)
end end
return (not quality or quality < 6) return (not quality or quality < 6)
and status ~= ITEM_BIND_ON_PICKUP and status ~= ITEM_BIND_ON_PICKUP
and status ~= ITEM_BIND_QUEST and status ~= ITEM_BIND_QUEST
and status ~= ITEM_SOULBOUND 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 (strict and durability and durability < max_durability) and not (strict and current_durability and current_durability < max_durability)
end end
function M.tooltip(setter, arg1, arg2) function M.tooltip(setter, arg1, arg2)