Shuffle some code around for more logical order.

This commit is contained in:
Hendrik Leppkes
2009-05-21 12:53:22 +02:00
parent bc39082795
commit 922d7f32e6
+4 -5
View File
@@ -280,6 +280,10 @@ end
local function updateFunc(self) local function updateFunc(self)
local parent = self:GetParent() local parent = self:GetParent()
if not self.BT4init or not parent.BT4BarType then return end 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) updateIcon(self)
if self.SecureInit and not InCombatLockdown() then if self.SecureInit and not InCombatLockdown() then
@@ -290,11 +294,6 @@ local function updateFunc(self)
control:RunFor(frame, frame:GetAttribute("UpdateAutoAssist")) control:RunFor(frame, frame:GetAttribute("UpdateAutoAssist"))
]]) ]])
end end
if not ActionHasRange(self.action) then
self.rangeTimer = nil
self.outOfRange = nil
end
end end
hooksecurefunc("ActionButton_Update", updateFunc) hooksecurefunc("ActionButton_Update", updateFunc)