in your browser.
[LUA] Spell casting
Return to board index
How can the addon cast a spell when the user clicks on a frame? I know CastSpell() and CastSpellByName() is protected, but I also know that the only way an addon can cast a spell is when the user clicks something, or presses a key.
I've created all the necessary frames and event handlers, I just can't for the life of me figure out how to cast a spell on MouseDown, when I'm not allowed to use CastSpell() or CastSpellByName().
Any tips on how to go about this?
You have to make a frame where you can drop a spell/macro icon, or a frame that mimic those.
Yes, you must create a frame that implements SecureButtonTemplate or a similar secure template, and it can ONLY cast a spell on a click or hotkey, just like any other button.
Alright, thanks, I ended up using SecureActionButtonTemplate. :D
You are not logged in. Please
to post a reply or
if you don't already have an account.
Connect with Wowhead
Other Fanbyte Sites
Hearthstone Top Decks
Final Fantasy XI
© 2021 Fanbyte