API GetSpellBookItemName

Retrieves the spell name and spell rank for a spell in the player's spell book. spellName, spellSubName, spellID = GetSpellBookItemName(spellName) = GetSpellBookItemName(index, bookType)

Arguments

 * spellName : string - Spell book item name.


 * index : number - Spell book slot index. Valid values are 1 through total number of spells in the spell book on all pages and all tabs, ignoring empty slots.
 * bookType: string -  or   depending on if you wish to query the player or pet spellbook. Internally the game only tests if this value is equal to   and treats any other string value as "spell"

Returns

 * spellName : String - Name of the spell as it appears in the spell book, e.g. "Lesser Heal"
 * spellSubName : String - The spell rank or sub type, e.g. "Grand Master", "Racial Passive". This can be an empty string. Note: for the Enchanting trade skill at rank Apprentice, the returned string contains a trailing space, i.e. "Apprentice ". This might be the case for other trade skills and ranks also. Not readily available on function call, see SpellMixin:ContinueOnSpellLoad.
 * spellID : Number

Details

 * This function will return nested flyout spells, but the names returned may not be functional (a hunter will see "Call " instead of "Call Pet 1" but "/cast Call " will not function in a macro or from the command line). Use care with the results returned..
 * Use in conjunction with to determine if a player knows this spell.
 * Spell book information is first available after the event fires.

Example
Prints all spells in the spellbook for the player, except the profession tab ones.