From 47c8816bae72edcb61dc1a3bb41ae81f69f832f5 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 5 Mar 2020 19:28:12 +0100 Subject: [PATCH] unitframes: remove attributes during creation --- api/unitframes.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 109b6c01..834830fb 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -892,13 +892,10 @@ function pfUI.uf:EnableScripts() local f = self -- handle secure unit button templates (> vanilla) - if f.SetAttribute and RegisterStateDriver then + if f.SetAttribute then f.showmenu = pfUI.uf.RightClickAction - f:SetAttribute("unit", f.label .. f.id) f:SetAttribute("type1", "target") f:SetAttribute("type2", "showmenu") - f.visibilitycondition = string.format("[target=%s%s,exists] show; hide", f.label, f.id) - RegisterStateDriver(f, 'visibility', f.visibilitycondition) else f:SetScript("OnClick", pfUI.uf.OnClick) end