From 88cd6dcf86c91131d6e0c984d5eb3551231b4f92 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 13 Jun 2019 18:34:59 +0200 Subject: [PATCH] actionbar: treat auto-repeat actions as active --- modules/actionbar.lua | 35 +++++++++++++---------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 4448fc17..90a56b53 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -218,18 +218,6 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () local start, duration, enable local castable, autocast, token - -- abort as early as possible on regular state update - if event == "ACTIONBAR_UPDATE_STATE" and not self.hide and self.bar ~= 11 and self.bar ~= 12 then - if IsCurrentAction(sid) then - self.backdrop:SetBackdropBorderColor(cr,cg,cb,1) - self.active:Show() - else - CreateBackdrop(self, border) - self.active:Hide() - end - return - end - -- set the own ID for compatibility to some vanilla addons if pfUI.client <= 11200 then self:SetID(self.id) end @@ -251,7 +239,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () usable, oom = true, nil start, duration, enable = GetPetActionCooldown(sid) else - active = IsCurrentAction(sid) + active = IsCurrentAction(sid) or IsAutoRepeatAction(sid) texture = GetActionTexture(sid) bar = GetActiveBar() id = sid - ((self.bar == 1 and bar or self.bar)-1)*12 @@ -259,6 +247,18 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () start, duration, enable = GetActionCooldown(sid) end + -- active border + if active then + self.backdrop:SetBackdropBorderColor(cr,cg,cb,1) + self.active:Show() + else + CreateBackdrop(self, border) + self.active:Hide() + end + + -- abort as early as possible on regular state update + if event == "ACTIONBAR_UPDATE_STATE" then return end + -- handle secure action button templates (tbc+) if self.SetAttribute then if self.bar == 11 then @@ -353,15 +353,6 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () end end - -- active border - if active then - self.backdrop:SetBackdropBorderColor(cr,cg,cb,1) - self.active:Show() - else - CreateBackdrop(self, border) - self.active:Hide() - end - -- keybinds if not self.hide and self.bar == 1 and self.bar ~= 11 and self.bar ~= 12 then self.keybind:SetText(GetBindingText(GetBindingKey("ACTIONBUTTON"..id), "KEY_", 1))