From 4bd18e8a10bea7ebd2a646c2243b0ff49889ffa8 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 25 Mar 2016 02:13:49 +0100 Subject: [PATCH] added ignore owner settings --- Aux-AddOn.toc | 2 +- info.lua | 2 +- scan.lua | 2 +- slash.lua | 31 +++++++++++++++++-------------- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Aux-AddOn.toc b/Aux-AddOn.toc index 2af6c3a..94ce514 100644 --- a/Aux-AddOn.toc +++ b/Aux-AddOn.toc @@ -1,6 +1,6 @@ ## Interface: 11200 ## Title: Aux -## SavedVariablesPerCharacter: aux_recent_searches, aux_favorite_searches, aux_post_mode, aux_price_per_unit, aux_tooltip_daily, aux_tooltip_vendor_buy, aux_tooltip_vendor_sell, aux_tooltip_disenchant_value, aux_tooltip_disenchant_distribution, aux_tooltip_disenchant_source +## SavedVariablesPerCharacter: aux_ignore_owner, aux_recent_searches, aux_favorite_searches, aux_post_mode, aux_price_per_unit, aux_tooltip_daily, aux_tooltip_vendor_buy, aux_tooltip_vendor_sell, aux_tooltip_disenchant_value, aux_tooltip_disenchant_distribution, aux_tooltip_disenchant_source ## SavedVariables: aux_datasets, aux_items, aux_item_ids, aux_auctionable_items, aux_merchant_buy, aux_merchant_sell slash.lua diff --git a/info.lua b/info.lua index 62535bb..f503f3b 100644 --- a/info.lua +++ b/info.lua @@ -135,7 +135,7 @@ function public.auction(index, type) hyperlink = hyperlink, itemstring = item_info.itemstring, item_key = item_id..':'..suffix_id, - search_signature = Aux.util.join({item_id, suffix_id, enchant_id, start_price, buyout_price, bid_price, aux_quantity, duration, high_bidder and 1 or 0, owner or '?'}, ':'), + search_signature = Aux.util.join({item_id, suffix_id, enchant_id, start_price, buyout_price, bid_price, aux_quantity, duration, high_bidder and 1 or 0, not aux_ignore_owner and owner or '?'}, ':'), name = name, texture = texture, diff --git a/scan.lua b/scan.lua index 392fbe6..eb5baa1 100644 --- a/scan.lua +++ b/scan.lua @@ -99,7 +99,7 @@ function private.wait_for_list_results(k) end function private.owner_data_complete() - if private.current_thread().params.no_wait_owner then + if private.current_thread().params.no_wait_owner or aux_ignore_owner then return true end local count, _ = GetNumAuctionItems(private.current_thread().params.type) diff --git a/slash.lua b/slash.lua index 15b68f6..1830445 100644 --- a/slash.lua +++ b/slash.lua @@ -1,44 +1,47 @@ SLASH_AUX1 = '/aux' -function SlashCmdList.AUX(parameter) - if parameter == 'clear history' then +function SlashCmdList.AUX(command) + if command == 'clear history' then Aux.persistence.load_dataset().history = nil Aux.log('History cleared.') - elseif parameter == 'clear post' then + elseif command == 'clear post' then Aux.persistence.load_dataset().post = nil Aux.log('Post settings cleared.') - elseif parameter == 'clear datasets' then + elseif command == 'clear datasets' then aux_datasets = {} Aux.log('Datasets cleared.') - elseif parameter == 'clear merchant buy' then + elseif command == 'clear merchant buy' then aux_merchant_buy = {} Aux.log('Merchant buy prices cleared.') - elseif parameter == 'clear merchant sell' then + elseif command == 'clear merchant sell' then aux_merchant_sell = {} Aux.log('Merchant sell prices cleared.') - elseif parameter == 'clear item cache' then + elseif command == 'clear item cache' then aux_items = {} aux_item_ids = {} aux_auctionable_items = {} Aux.log('Item cache cleared.') - elseif parameter == 'populate wdb' then + elseif command == 'populate wdb' then Aux.cache.populate_wdb() - elseif parameter == 'tooltip daily' then + elseif command == 'tooltip daily' then aux_tooltip_daily = not aux_tooltip_daily Aux.log('Market value in tooltip '..(aux_tooltip_daily and 'enabled' or 'disabled')..'.') - elseif parameter == 'tooltip vendor buy' then + elseif command == 'tooltip vendor buy' then aux_tooltip_vendor_buy = not aux_tooltip_vendor_buy Aux.log('Vendor buy price in tooltip '..(aux_tooltip_vendor_buy and 'enabled' or 'disabled')..'.') - elseif parameter == 'tooltip vendor sell' then + elseif command == 'tooltip vendor sell' then aux_tooltip_vendor_sell = not aux_tooltip_vendor_sell Aux.log('Vendor sell price in tooltip '..(aux_tooltip_vendor_sell and 'enabled' or 'disabled')..'.') - elseif parameter == 'tooltip disenchant value' then + elseif command == 'tooltip disenchant value' then aux_tooltip_disenchant_value = not aux_tooltip_disenchant_value Aux.log('Disenchant value in tooltip '..(aux_tooltip_disenchant_value and 'enabled' or 'disabled')..'.') - elseif parameter == 'tooltip disenchant distribution' then + elseif command == 'tooltip disenchant distribution' then aux_tooltip_disenchant_distribution = not aux_tooltip_disenchant_distribution Aux.log('Disenchant distribution in tooltip '..(aux_tooltip_disenchant_distribution and 'enabled' or 'disabled')..'.') - elseif parameter == 'tooltip disenchant source' then + elseif command == 'tooltip disenchant source' then aux_tooltip_disenchant_source = not aux_tooltip_disenchant_source Aux.log('Disenchant source in tooltip '..(aux_tooltip_disenchant_source and 'enabled' or 'disabled')..'.') + elseif command == 'ignore owner' then + aux_ignore_owner = not aux_ignore_owner + Aux.log('Ignoring of owner '..(aux_ignore_owner and 'enabled' or 'disabled')..'.') end end \ No newline at end of file