From 3978a67fb2505045112a6f5e9acb002f51f3a389 Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Mon, 7 Sep 2015 14:07:38 +0200 Subject: [PATCH] removed needless global --- Auctionator.lua | 8 +++++--- Auctionator.xml | 5 +---- 2 files changed, 6 insertions(+), 7 deletions(-) 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()