diff --git a/Auctionator.lua b/Auctionator.lua
index 7755b6b..e08d281 100644
--- a/Auctionator.lua
+++ b/Auctionator.lua
@@ -12,6 +12,8 @@ auctionatorEntries = {}
local AUCTIONATOR_TAB_INDEX = 4
+local timeOfLastUpdate = GetTime()
+
-----------------------------------------
local Auctionator_Orig_AuctionFrameBrowse_Update
@@ -641,15 +643,15 @@ end
-----------------------------------------
-function Auctionator_OnUpdate(self)
+function Auctionator_OnUpdate()
if not AuctionatorMessage then
return
end
- if scanState == SCAN_STATE_PREQUERY and GetTime() - self.TimeOfLastUpdate > 0.5 then
+ if scanState == SCAN_STATE_PREQUERY and GetTime() - timeOfLastUpdate > 0.5 then
- self.TimeOfLastUpdate = GetTime()
+ timeOfLastUpdate = GetTime()
if CanSendAuctionQuery() then
Auctionator_Scan_Query()
diff --git a/Auctionator.xml b/Auctionator.xml
index 9304a1e..72f44d9 100644
--- a/Auctionator.xml
+++ b/Auctionator.xml
@@ -13,12 +13,9 @@
this:RegisterEvent("AUCTION_HOUSE_SHOW")
this:RegisterEvent("AUCTION_HOUSE_CLOSED")
this:RegisterEvent("NEW_AUCTION_UPDATE")
-
- self = {}
- self.TimeOfLastUpdate = GetTime()
- Auctionator_OnUpdate(self)
+ Auctionator_OnUpdate()
Auctionator_EventHandler()