From e399673b6e4df6780d4b7afdc83fb8a518bfbf23 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Wed, 27 Jan 2016 13:14:15 +0100 Subject: [PATCH] some improvements for the post tab --- bids_frame.lua | 2 +- core.lua | 2 +- filter_search_frame.lua | 2 +- item_search_frame.lua | 2 +- post_frame.lua | 20 +++++++++++++------- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/bids_frame.lua b/bids_frame.lua index 2b765a2..d04d253 100644 --- a/bids_frame.lua +++ b/bids_frame.lua @@ -276,7 +276,7 @@ function private.process_request(entry, express_mode, buyout_mode) local function test(index) local auction_record = private.create_auction_record(Aux.info.auction(index, 'bidder')) - return auction_record.signature == entry.signature and auction_record.bid_price == entry.bid_price and auction_record.owner ~= UnitName('player') + return auction_record.signature == entry.signature and auction_record.bid_price == entry.bid_price and auction_record.duration == entry.duration and auction_record.owner ~= UnitName('player') end local function remove_entry() diff --git a/core.lua b/core.lua index 63d0cec..9c3980b 100644 --- a/core.lua +++ b/core.lua @@ -1,4 +1,4 @@ -AuxVersion = '2.3.3' +AuxVersion = '2.3.4' AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)' local lastRightClickAction = GetTime() diff --git a/filter_search_frame.lua b/filter_search_frame.lua index d5ec7ec..bd3c38e 100644 --- a/filter_search_frame.lua +++ b/filter_search_frame.lua @@ -792,7 +792,7 @@ function private.process_request(entry, express_mode, buyout_mode) local function test(index) local auction_record = private.create_auction_record(Aux.info.auction(index)) - return auction_record.signature == entry.signature and auction_record.bid_price == entry.bid_price and auction_record.owner ~= UnitName('player') + return auction_record.signature == entry.signature and auction_record.bid_price == entry.bid_price and auction_record.duration == entry.duration and auction_record.owner ~= UnitName('player') end local function remove_entry() diff --git a/item_search_frame.lua b/item_search_frame.lua index ecc7cc9..2c33494 100644 --- a/item_search_frame.lua +++ b/item_search_frame.lua @@ -620,7 +620,7 @@ function private.process_request(entry, express_mode, buyout_mode) local function test(index) local auction_record = private.create_auction_record(Aux.info.auction(index)) - return auction_record.signature == entry.signature and auction_record.bid_price == entry.bid_price and auction_record.owner ~= UnitName('player') + return auction_record.signature == entry.signature and auction_record.bid_price == entry.bid_price and auction_record.duration == entry.duration and auction_record.owner ~= UnitName('player') end local function remove_entry() diff --git a/post_frame.lua b/post_frame.lua index 9a2c33c..c1737da 100644 --- a/post_frame.lua +++ b/post_frame.lua @@ -356,7 +356,13 @@ function private.post_auctions() local charge_class = auction.charges or 0 auction.availability[charge_class] = auction.availability[charge_class] - (posted * (auction.charges and 1 or stack_size)) - selected_item = nil + if selected_item == auction then + if auction.aux_quantity > 0 then + private.set_item(auction) + else + selected_item = nil + end + end private.update_recommendation() refresh = true end @@ -366,22 +372,22 @@ end function private.select_auction() if not existing_auctions[selected_item.key].selected and getn(existing_auctions[selected_item.key]) > 0 then - local cheapest_for_size = {} +-- local cheapest_for_size = {} local cheapest for _, auction_entry in ipairs(existing_auctions[selected_item.key]) do - if not cheapest_for_size[auction_entry.stack_size] or cheapest_for_size[auction_entry.stack_size].unit_buyout_price >= auction_entry.unit_buyout_price then - cheapest_for_size[auction_entry.stack_size] = auction_entry - end +-- if not cheapest_for_size[auction_entry.stack_size] or cheapest_for_size[auction_entry.stack_size].unit_buyout_price >= auction_entry.unit_buyout_price then +-- cheapest_for_size[auction_entry.stack_size] = auction_entry +-- end if not cheapest or cheapest.unit_buyout_price > auction_entry.unit_buyout_price then cheapest = auction_entry end end - local auction = cheapest_for_size[private.get_stack_size_slider_value()] or cheapest +-- local auction = cheapest_for_size[private.get_stack_size_slider_value()] or cheapest - existing_auctions[selected_item.key].selected = auction + existing_auctions[selected_item.key].selected = cheapest end end