From 922d7f32e6ad934739d03899103f4034a7f872a2 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Thu, 21 May 2009 12:53:22 +0200 Subject: [PATCH] Shuffle some code around for more logical order. --- ActionButton.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ActionButton.lua b/ActionButton.lua index 1afa1a1..9f04112 100644 --- a/ActionButton.lua +++ b/ActionButton.lua @@ -280,6 +280,10 @@ end local function updateFunc(self) local parent = self:GetParent() if not self.BT4init or not parent.BT4BarType then return end + if not ActionHasRange(self.action) then + self.rangeTimer = nil + self.outOfRange = nil + end updateIcon(self) if self.SecureInit and not InCombatLockdown() then @@ -290,11 +294,6 @@ local function updateFunc(self) control:RunFor(frame, frame:GetAttribute("UpdateAutoAssist")) ]]) end - - if not ActionHasRange(self.action) then - self.rangeTimer = nil - self.outOfRange = nil - end end hooksecurefunc("ActionButton_Update", updateFunc)