Binding a key directly to a companion
I'm trying to allow users of my addon to directly bind keys to companions.
SetBindingSpell("key", "spell name") doesn't seem to work, SetBindingSpell("key", "spellID") seems to set the spell properly, in that GetSpellTexture(GetBindingAction("key")) returns the correct texture for the spell, however pressing the key doesn't call the companion. Is there another way to do this that doesn't involve either creating a macro, or creating a button? |
SetBindingSpell requires a spell name to work; giving it a spell ID won't generate any errors, but it won't work either.
It looks like the answer to your question, though, is that you cannot directly keybind companions (or mounts). |
You can check out ncHoverBind and see how it's done there (it SHOULD work, though I haven't had the chance to really test it). If you find it of any use, you're welcome to try replicating it to work with your addon.
|
Not an ideal solution, since the buttons can shift around, but you could do something like:
SetBindingClick("Q", "SpellBookCompanionButton1") Would require some extra work to check what's currently in that slot. |
Quote:
|
All times are GMT -6. The time now is 03:02 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI