WoW:API CastSpell: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
Line 37: Line 37:
;''Note''
;''Note''


: Currently the spellbookTabNum is ignored, but you can cast spells from other tabs by counting spellID from the General tab. Eg. with 12 spells in the General tab a spell ID of 13 corresponds to the first spell of the second tab. -NOTE: This is no longer true, the spellbookTabNum is required, and I have found no easy way to retrive this info
: Just use SpellBookFrame.bookType as the spellbookTabNum for any spell. the id is then just counted from the beginning through all tabs. the CastSpell function can only be used in OnClick functions. Another way is to use it in a Slash command and then the user makes a macro out of it and clicks on it. (seems WoW only allows this when a mouseclick / key input has initiated it)
----
----
{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Spell Functions|CastSpell]]
[[Category:API Spell Functions|CastSpell]]
Anonymous user