From fb2c3bad79d231e5e22ed455cd9342f504bb9e1f Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 23 Dec 2019 02:11:05 +0100 Subject: [PATCH] actionbar: update usable on range change --- modules/actionbar.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 51f4de70..b91698e0 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -368,21 +368,6 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () end end - local function ButtonRangeUpdate(self) - local self = self or this - - -- update range display - if C.bars.glowrange == "1" and self.bar ~= 11 and self.bar ~= 12 and HasAction(self.id) and ActionHasRange(self.id) and IsActionInRange(self.id) == 0 then - if not self.outofrange then - self.outofrange = true - updatecache[self.slot] = true - end - elseif self.outofrange then - self.outofrange = nil - updatecache[self.slot] = true - end - end - local function ButtonDrag(self) local self = self or this @@ -524,6 +509,21 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () end end + local function ButtonRangeUpdate(self) + local self = self or this + + -- update range display + if C.bars.glowrange == "1" and self.bar ~= 11 and self.bar ~= 12 and HasAction(self.id) and ActionHasRange(self.id) and IsActionInRange(self.id) == 0 then + if not self.outofrange then + self.outofrange = true + ButtonUpdateUsable(self) + end + elseif self.outofrange then + self.outofrange = nil + ButtonUpdateUsable(self) + end + end + local function ButtonUpdateCooldown(button) if not button then return end local start, duration, enable