API GetSpellBookItemInfo

From Wowpedia
Jump to: navigation, search

Retrieves information about a specific SpellBook item

skillType, special = GetSpellBookItemInfo("spellName")
                   = GetSpellBookItemInfo(index, "bookType")

Arguments

spellName 
string - The name of the spell you want to query

or

index 
number - The index into the spellbook
bookType 
string - Spell book type; either BOOKTYPE_PET ("pet") or BOOKTYPE_SPELL ("spell"). From a practical standpoint, while this parm may not be nil, it is processes as "pet" or not "pet" (any non-nil value that is not "pet" will result in "spell" processing).

Returns

skillType 
String - The type of the spell (known values: "SPELL", "PETACTION", "FUTURESPELL", "FLYOUT")
special 
Number - For returns of type "SPELL" and "FUTURESPELL", this is the SpellID. - For returns of type "PETACTION", this is the ActionID (for use in C_ActionBar.HasPetActionButtons(actionID) or C_ActionBar.HasPetActionPetBarIndices(actionID) and other similar functions). - for returns of type "FLYOUT", this is the FlyoutID (as used in GetFlyoutInfo(FlyoutID) and other similar functions).

If nothing is found or invalid parameters were supplied, nil is returned.