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