Fandom

WoWWiki

API GetMacroSpell

104,641pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < GetMacroSpell

Returns the spell a given macro is set to cast. This function can be used by action bar addons to display dynamic macro icons and tooltips. As a macro's cast sequence changes, this function can be queried to get the next spell that will be cast.


name, rank = GetMacroSpell(slot)


Arguments: Edit

"slot" 
number - The macro slot to query


Returns: Edit

name 
The name of the spell the macro is set to cast (string)


rank 
The rank of the spell, if applicable (string)

Example: Edit

       local index = GetMacroIndexByName(spell);
       if (index) then 
             local spellname, rank = GetMacroSpell(index);
             spell = spellname;
       end

Also on Fandom

Random Wiki