WoW:API GetSpellBookItemInfo: Difference between revisions
(firt) |
m (Move page script moved page API GetSpellBookItemInfo to API GetSpellBookItemInfo without leaving a redirect) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 4: | Line 4: | ||
Retrieves information about a specific SpellBook item | Retrieves information about a specific SpellBook item | ||
skillType, | skillType, contextualID = GetSpellBookItemInfo(entryName) | ||
or | or | ||
skillType, | skillType, contextualID = GetSpellBookItemInfo(index, spellBookType) | ||
== Arguments == | == Arguments == | ||
:; | :;entryName | ||
:;index:Number - The index into the spellbook | ::String - The name of the spell, flyout, or pet ability you want to query | ||
:; | :;index | ||
::Number - The index into the spellbook | |||
:;spellBookType | |||
::String - "pet" - which will search pull the entry from the pet spellbook or any other string (even an empty string - but not nil) which will pull the entry from the player's main spellbook. | |||
== Returns == | == Returns == | ||
:;skillType:String - The type of the spell (known values: "SPELL", "PETACTION", "FUTURESPELL", "FLYOUT") | :;skillType | ||
:; | ::String - The type of the spell (known values: "SPELL", "PETACTION", "FUTURESPELL", "FLYOUT") | ||
:;contextualID | |||
::Number - For SPELL and FUTURESPELL this is the spellID. For PetAction is it an integer value that is troublesome to use outside of two functions related solely to the PetBarUI. For Flyout, it is the FlyoutID. | |||
If nothing is found or invalid parameters were supplied, nil is returned | If nothing is found or invalid parameters were supplied, nil is returned | ||
Latest revision as of 04:46, 15 August 2023
Synopsis
Retrieves information about a specific SpellBook item
skillType, contextualID = GetSpellBookItemInfo(entryName)
or
skillType, contextualID = GetSpellBookItemInfo(index, spellBookType)
Arguments
- entryName
- String - The name of the spell, flyout, or pet ability you want to query
- index
- Number - The index into the spellbook
- spellBookType
- String - "pet" - which will search pull the entry from the pet spellbook or any other string (even an empty string - but not nil) which will pull the entry from the player's main spellbook.
Returns
- skillType
- String - The type of the spell (known values: "SPELL", "PETACTION", "FUTURESPELL", "FLYOUT")
- contextualID
- Number - For SPELL and FUTURESPELL this is the spellID. For PetAction is it an integer value that is troublesome to use outside of two functions related solely to the PetBarUI. For Flyout, it is the FlyoutID.
If nothing is found or invalid parameters were supplied, nil is returned