Shuffle some code around for more logical order.
This commit is contained in:
+4
-5
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user