From bef481252203a8da4ac68a618b03e8a681750423 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Sat, 16 Jan 2016 09:10:30 +0100 Subject: [PATCH] fixed a bug where auctions and bids would not show without a refresh after restarting the ah interface --- core.lua | 6 +++++- core.xml | 1 + scan.lua | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/core.lua b/core.lua index 7a00ce6..f62e9e8 100644 --- a/core.lua +++ b/core.lua @@ -1,4 +1,4 @@ -AuxVersion = '2.1.7' +AuxVersion = '2.1.8' AuxAuthors = 'shirsig; Zerf; Zirco (Auctionator); Nimeral (Auctionator backport)' local lastRightClickAction = GetTime() @@ -41,6 +41,10 @@ function Aux_OnEvent() Aux_OnAuctionHouseShow() elseif event == 'AUCTION_HOUSE_CLOSED' then Aux_OnAuctionHouseClosed() + Aux.bids_loaded = false + Aux.current_owner_page = nil + elseif event == 'AUCTION_BIDDER_LIST_UPDATE' then + Aux.bids_loaded = true elseif event == 'AUCTION_OWNED_LIST_UPDATE' then Aux.current_owner_page = Aux.last_owner_page_requested or 0 end diff --git a/core.xml b/core.xml index 8349ba2..15a1983 100644 --- a/core.xml +++ b/core.xml @@ -9,6 +9,7 @@ this:RegisterEvent('ADDON_LOADED') this:RegisterEvent('AUCTION_HOUSE_SHOW') this:RegisterEvent('AUCTION_HOUSE_CLOSED') + this:RegisterEvent('AUCTION_BIDDER_LIST_UPDATE') this:RegisterEvent('AUCTION_OWNED_LIST_UPDATE') diff --git a/scan.lua b/scan.lua index 66e0a05..a927e9b 100644 --- a/scan.lua +++ b/scan.lua @@ -49,7 +49,9 @@ end function wait_for_results(k) local ok if state.job.type == 'bidder' then - ok = true + Aux.control.as_soon_as(function() return Aux.bids_loaded end, function() + ok = true + end) elseif state.job.type == 'owner' then if state.page == Aux.current_owner_page then ok = true