Bind spell to a actionbutton
Is there an API or method available that allows for the assignment of a spell to an action button without the need to manually drag and drop the spell from the spellbook to the desired action button?
SetBindingSpell does this: SetBindingSpell("key", "spell"); I need something like this: SetBindingSpell("ACTIONBUTTON1", "Frostbolt"); |
I use SetAttribute on my MagePorts addon.
https://warcraft.wiki.gg/wiki/API_Frame_SetAttribute Another addon that uses it is https://www.wowinterface.com/downloa...ofessions.html which was based on an early version of my MagePorts addon. But these are on newly created buttons and not Blizzard created ones. |
I'd take a look at these two. Be aware they may be protected functions despite not being labeled as such.
PickupSpell() PlaceAction() Note: The Pickup/Place functions are what facilitate the drag-and-drop system and as such manipulate what's being held by the cursor. You may want to call ClearCursor() first to make sure it isn't holding anything if you wish to do this in code. |
Thank you @Xrystal and @SDPhantom
I‘ll have a look at it :) |
|
All times are GMT -6. The time now is 03:38 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI