auctionable check improvements
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ end
|
||||
|
||||
function post_auction(slot, k)
|
||||
local item_info = info.container_item(unpack(slot))
|
||||
if item_info.item_key == state.item_key and info.auctionable(item_info.tooltip) and item_info.aux_quantity == state.stack_size then
|
||||
if item_info.item_key == state.item_key and info.auctionable(item_info.tooltip, nil, true) and item_info.aux_quantity == state.stack_size then
|
||||
|
||||
ClearCursor()
|
||||
ClickAuctionSellItemButton()
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ end
|
||||
|
||||
function matching_item(slot, partial)
|
||||
local item_info = temp-info.container_item(unpack(slot))
|
||||
return item_info and item_info.item_key == state.item_key and info.auctionable(item_info.tooltip) and (not partial or item_info.count < item_info.max_stack)
|
||||
return item_info and item_info.item_key == state.item_key and info.auctionable(item_info.tooltip, nil, true) and (not partial or item_info.count < item_info.max_stack)
|
||||
end
|
||||
|
||||
function find_empty_slot()
|
||||
|
||||
+2
-2
@@ -344,7 +344,7 @@ function unit_vendor_price(item_key)
|
||||
temp(slot)
|
||||
local item_info = temp-info.container_item(unpack(slot))
|
||||
if item_info and item_info.item_key == item_key then
|
||||
if info.auctionable(item_info.tooltip, nil, item_info.lootable) then
|
||||
if info.auctionable(item_info.tooltip, nil, true) and not item_info.lootable then
|
||||
ClearCursor()
|
||||
PickupContainerItem(unpack(slot))
|
||||
ClickAuctionSellItemButton()
|
||||
@@ -402,7 +402,7 @@ function update_inventory_records()
|
||||
local item_info = temp-info.container_item(unpack(slot))
|
||||
if item_info then
|
||||
local charge_class = item_info.charges or 0
|
||||
if info.auctionable(item_info.tooltip, nil, item_info.lootable) then
|
||||
if info.auctionable(item_info.tooltip, nil, true) and not item_info.lootable then
|
||||
if not auctionable_map[item_info.item_key] then
|
||||
local availability = T
|
||||
for i = 0, 10 do
|
||||
|
||||
+2
-3
@@ -262,11 +262,10 @@ function M.display_name(item_id, no_brackets, no_color)
|
||||
end
|
||||
end
|
||||
|
||||
function M.auctionable(tooltip, quality, lootable)
|
||||
function M.auctionable(tooltip, quality, strict)
|
||||
local status = tooltip[2] and tooltip[2].left_text
|
||||
local durability, max_durability = durability(tooltip)
|
||||
return not lootable
|
||||
and (not quality or quality < 6)
|
||||
return and (not quality or quality < 6)
|
||||
and status ~= ITEM_BIND_ON_PICKUP
|
||||
and status ~= ITEM_BIND_QUEST
|
||||
and status ~= ITEM_SOULBOUND
|
||||
|
||||
Reference in New Issue
Block a user