unitframes: 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.
This commit is contained in:
shagu
2020-04-17 19:32:46 +02:00
parent f540fc7bdc
commit 4aa8445bc6
+3 -3
View File
@@ -244,7 +244,7 @@ function pfUI.uf:UpdateVisibility()
end
-- tbc visibility
if self.SetAttribute and RegisterStateDriver then
if pfUI.client > 11200 then
self:SetAttribute("unit", unitstr)
-- update visibility condition on change
@@ -901,7 +901,7 @@ function pfUI.uf:EnableScripts()
local f = self
-- handle secure unit button templates (> vanilla)
if f.SetAttribute then
if pfUI.client > 11200 then
f.showmenu = pfUI.uf.RightClickAction
f:SetAttribute("*type1", "target")
f:SetAttribute("*type2", "showmenu")
@@ -1610,7 +1610,7 @@ function pfUI.uf:EnableClickCast()
local bconf = bid == 1 and "" or bid
if pfUI_config.unitframes["clickcast"..bconf..mconf] ~= "" then
-- prepare click casting
if self.SetAttribute then
if pfUI.client > 11200 then
-- set attributes for tbc+
local prefix = modifier == "" and "" or modifier .. "-"