WoWInterface - View Single Post - SecureHandler template object fails visibility check
View Single Post
02-07-18, 07:45 AM   #2
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 151
You may check the RestrictedEnvironment.lua#L18-L94, the CancelUnitBuff can't be used in the secure snippets. Also none secure frames like the cooldown can't be used in the secure snippets.

You should use SecureActionButtonTemplate instead of the SecureHandlerClickTemplate

Lua Code:
  1. local button = CreateFrame("Button", nil, UIParent, "SecureActionButtonTemplate")
  2. button:SetAttribute("*type2", "cancelaura")
  3. button:SetAttribute("spell", "the spell name")

See SecureTemplates.lua#L443-L459 for details.
  Reply With Quote