From 826e179c187e66b59e96964808e39e3706fcd180 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 17 Apr 2020 19:35:35 +0200 Subject: [PATCH] actionbars: don't rely on API calls due to shitty addons NotGrid and other Grid forks add :SetAttribute to all frames that are created, no matter if its their own or not. Since the :SetAttribute provided by those is unfunctional, we need to ignore them and use client identifier checks instead. --- modules/actionbar.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/actionbar.lua b/modules/actionbar.lua index 13b73b35..4f6ddf9e 100644 --- a/modules/actionbar.lua +++ b/modules/actionbar.lua @@ -870,7 +870,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () end -- set required attributes for regular tbc buttons - if f.SetAttribute then + if pfUI.client > 11200 then if bar == 11 then f:SetAttribute("type", "spell") f:SetAttribute('spell', select(2, GetShapeshiftFormInfo(button))) @@ -1020,7 +1020,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () if enable == "1" then -- handle pet bar if i == 12 then - if bars[i].SetAttribute and RegisterStateDriver then + if pfUI.client > 11200 then -- set state driver for pet bars bars[i]:SetAttribute("unit", "pet") RegisterStateDriver(bars[i], 'visibility', "[pet] show; hide") @@ -1116,7 +1116,7 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function () end -- add up to 0-11 button parent states to each bar - if i <= 10 and bars[i].SetAttribute then + if i <= 10 and pfUI.client > 11200 then bars[i]:SetAttribute("statebutton", "0:S0;1:S1;2:S2;3:S3;4:S4;5:S5;6:S6;7:S7;8:S8;9:S9;10:S10;11:S11;") bars[i]:SetAttribute("statebutton2", "0:S0Right;1:S1Right;2:S2Right;3:S3Right;4:S4Right;5:S5Right;6:S6Right;7:S7Right;8:S8Right;9:S9Right;10:S10Right;11:S11Right;") end