From 58e75fc4a668b0777983009728fe8337f85c94d3 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Tue, 8 Sep 2015 01:17:57 +0200 Subject: [PATCH] fixed a bug where when loading from cache the auctionator price wouldn't be added into the money frame because the blizzard handler was executed later --- Auctionator.lua | 13 ++++++++++++- Auctionator.xml | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Auctionator.lua b/Auctionator.lua index 055026e..b777c3a 100644 --- a/Auctionator.lua +++ b/Auctionator.lua @@ -49,7 +49,6 @@ function Auctionator_EventHandler() if event == "AUCTION_OWNED_LIST_UPDATE" then Auctionator_OnAuctionOwnedUpdate() end if event == "AUCTION_HOUSE_SHOW" then Auctionator_OnAuctionHouseShow() end if event == "AUCTION_HOUSE_CLOSED" then Auctionator_OnAuctionHouseClosed() end - if event == "NEW_AUCTION_UPDATE" then Auctionator_OnNewAuctionUpdate() end end @@ -223,12 +222,21 @@ end ----------------------------------------- +function Auctionator_AuctionSellItemButton_OnEvent() + Auctionator_Orig_AuctionSellItemButton_OnEvent() + Auctionator_OnNewAuctionUpdate() +end + +----------------------------------------- + function Auctionator_BrowseButton_OnClick(button) if arg1 == "LeftButton" then Auctionator_Orig_BrowseButton_OnClick(button) end end +----------------------------------------- + function Auctionator_BrowseButton_OnMouseDown() if arg1 == "RightButton" and AUCTIONATOR_INSTANT_BUYOUT then local index = this:GetID() + FauxScrollFrame_GetOffset(BrowseScrollFrame) @@ -272,6 +280,9 @@ function Auctionator_SetupHookFunctions() BrowseButton8:RegisterForClicks("LeftButtonUp", "RightButtonDown") BrowseButton8:SetScript("OnMouseDown", Auctionator_BrowseButton_OnMouseDown) + Auctionator_Orig_AuctionSellItemButton_OnEvent = AuctionSellItemButton_OnEvent + AuctionSellItemButton_OnEvent = Auctionator_AuctionSellItemButton_OnEvent + Auctionator_Orig_AuctionFrameTab_OnClick = AuctionFrameTab_OnClick AuctionFrameTab_OnClick = Auctionator_AuctionFrameTab_OnClick diff --git a/Auctionator.xml b/Auctionator.xml index b628d50..6e3841f 100644 --- a/Auctionator.xml +++ b/Auctionator.xml @@ -12,7 +12,6 @@ this:RegisterEvent("AUCTION_OWNED_LIST_UPDATE") this:RegisterEvent("AUCTION_HOUSE_SHOW") this:RegisterEvent("AUCTION_HOUSE_CLOSED") - this:RegisterEvent("NEW_AUCTION_UPDATE") Auctionator_OnUpdate()