Thread Tools Display Modes
04-03-22, 03:24 PM   #1
Nico1420
A Kobold Labourer
Join Date: Apr 2022
Posts: 1
Help for my clickable weakaura

Hello everyone, I created a weakaura that allows me to launch a BoP on my "focus" when I receive a whisp "bop" by a big button that appears on my screen.
I would like to perfect this and replace my focus with the person who threw the whisp at me.

currently it's like this

aura_env.wplayer = nil
aura_env.button = CreateFrame("Button", "buffButton", aura_env.region, "SecureActionButtonTemplate", BackdropTemplateMixin and "BackdropTemplate")

aura_env.button:SetAllPoints()
aura_env.button:SetAttribute("unit", "focus")
aura_env.button:SetAttribute("type","spell")

aura_env.auraID = 318038
aura_env.button:SetAttribute("spell", 10278)
aura_env.BuffLevel = 8


I put in bold and underlined what I need to change to be able to cast on the person who whisp me... because it's complicated in raid to plan his focus in advance
  Reply With Quote
04-03-22, 04:30 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
This is not possible.
  Reply With Quote
04-04-22, 05:57 AM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
More specifically, anything inheriting SecureActionButtonTemplate is a protected frame and protected frames won't let you change their attributes while in combat.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Help for my clickable weakaura

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off