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)