C_SpellBook
namespaceavailable in: camelotStatus in wowlua
51 functions: 22 implemented, 0 recorded, 29 guessed. 19 events, 12 of them fired by the emulator on its own.
Functions
| function | what it does | status |
|---|---|---|
AbortSpellIntro | Stops the introduction of a newly learned spell. · by wowlua(spellID: number) | guessed |
CastSpellBookItem | Casts the spell in a spellbook slot. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, targetSelf: boolean) | guessed |
ContainsAnyDisenchantSpell | Returns true if player knows any Disenchant spells.(): boolean | guessed |
FindBaseSpellByID | Returns the ID of the base spell of the given spell, or nil when the spell is unknown. · by wowlua(spellID: number): number? | implemented |
FindFlyoutSlotBySpellID | Returns the spellbook slot of the flyout that holds the given spell. · by wowlua(spellID: number): number | guessed |
FindSpellBookSlotForSpell | If found, returns the first slot position of a SpellBookItem matching the specified spell and criteria(spellIdentifier: SpellIdentifier, includeHidden: boolean, includeFlyouts: boolean, includeFutureSpells: boolean, includeOffSpec: boolean): (number?, SpellBookSpellBank?) | implemented |
FindSpellOverrideByID | Returns the ID of the spell that currently overrides the given spell, or the spell's own ID when none does. · by wowlua(spellID: number): number? | implemented |
GetClassSkillLineInfo | Returns the spellbook skill line of the player's class. · by wowlua(): SpellBookSkillLineInfo? | implemented |
GetCurrentLevelSpells | Returns general, class, and active spec spells that are learned at the specified level.(level: number): number[]? | guessed |
GetNumSpellBookSkillLines | Returns the number of tabs in the spellbook.(): number | implemented |
GetSkillLineIndexByID | Returns the spellbook index of the given skill line. · by wowlua(skillLineID: number): number? | guessed |
GetSpellBookItemAutoCast | Returns nothing if item doesn't exist or isn't a spell(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (boolean?, boolean?) | implemented |
GetSpellBookItemCastCount | Returns number of times a SpellBookItem can be cast, typically based on availability of things like required reagent items; Always returns 0 if item is not found or is not a spell(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): number | guessed |
GetSpellBookItemChargeDuration | Returns a duration object describing the active recharge time for a spellbook item.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): LuaDurationObject? | guessed |
GetSpellBookItemCharges | Returns a table of info about the charges of a charge-accumulating SpellBookItem; May return nil if item is not found or is not charge-based(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellChargeInfo? | guessed |
GetSpellBookItemCooldown | Returns the cooldown info of a spell.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellCooldownInfo? | implemented |
GetSpellBookItemCooldownDuration | Returns a duration object describing the active cooldown duration for a spellbook item.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, ignoreGCD: boolean): LuaDurationObject? | guessed |
GetSpellBookItemDescription | Returns the description of the spell in a spellbook slot. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): string? | guessed |
GetSpellBookItemInfo | Returns info for a spellbook item.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellBookItemInfo? | implemented |
GetSpellBookItemLevelLearned | Returns the level the spell is learned at; May return a different value if the player is currently Level Linked with another player; Returns 0 if item is not a Spell(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): number | implemented |
GetSpellBookItemLink | Returns a chat link for the spell in a spellbook slot. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, glyphID: number?): string? | implemented |
GetSpellBookItemLossOfControlCooldownDuration | Returns a duration object describing the active loss of control cooldown duration for a spellbook item.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): LuaDurationObject? | guessed |
GetSpellBookItemLossOfControlCooldownInfo | Returns nil if item doesn't exist or if this kind of item doesn't display cooldowns (ex: future or offspec spells)(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellLossOfControlInfo? | guessed |
GetSpellBookItemName | Returns the name of a spellbook item.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (string?, string?) | implemented |
GetSpellBookItemPowerCost | Returns a table containing one or more SpellPowerCostInfos, one for each power type a SpellBookItem costs.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellPowerCostInfo[]? | guessed |
GetSpellBookItemSkillLineIndex | Get the index of the SkillLine this SpellBookItem is part of(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): number? | guessed |
GetSpellBookItemTexture | Returns the icon texture of the spell in a spellbook slot. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): number? | implemented |
GetSpellBookItemTradeSkillLink | Returns nil if SpellBookItem is not associated with a trade skill(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): string? | guessed |
GetSpellBookItemType | Returns the type of the entry in a spellbook slot and its IDs. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (SpellBookItemType?, number?, number?) | implemented |
GetSpellBookSkillLineInfo | Returns info for the specified spellbook skill line.(skillLineIndex: number): SpellBookSkillLineInfo? | implemented |
HasPetSpells | Returns the number of available abilities for the player's combat pet.(): (number?, string?) | implemented |
IsAutoAttackSpellBookItem | Returns true if the SpellBookItem is the player's melee Auto Attack spell(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsClassTalentSpellBookItem | Returns true if the SpellBookItem comes from a Class Talent(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsPvPTalentSpellBookItem | Returns true if the SpellBookItem comes from a PvP Talent(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsRangedAutoAttackSpellBookItem | Returns true if the SpellBookItem is the player's ranged Auto Attack spell (ex: Shoot, Auto Shot, etc)(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsSpellBookItemHarmful | Returns true if the SpellBookIem can be cast on hostile targets(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsSpellBookItemHelpful | Returns true if the SpellBookIem can be cast on the player or other friendly targets(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsSpellBookItemInRange | Returns true if the current target is within range of the SpellBookIem; False if out of range; Nil if range check was invalid(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, targetUnit: string?): boolean? | guessed |
IsSpellBookItemLooseFlyoutMember | Returns true if the SpellBookItem is represented in a Flyout.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | implemented |
IsSpellBookItemLowRank | Returns true if the SpellBookItem is a lower rank of a known higher rank spell. Returns false if there is only a single rank or it is the highest rank known.(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | implemented |
IsSpellBookItemOffSpec | Returns true if the SpellBookItem belongs to a non-active class specialization(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
IsSpellBookItemPassive | Returns true if the SpellBookItem is a passive spell; Will always return false if it is not a spell(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | implemented |
IsSpellBookItemUsable | Returns whether the SpellBookItem is currently castable; Typically based on things like learned status, required resources, etc(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (boolean, boolean) | guessed |
IsSpellInSpellBook | Returns true if a spell should be found in the spellbook. This function can also return true for spells that aren't known, such as override spells granted by an aura linked to class talents(spellID: number, spellBank: SpellBookSpellBank, includeOverrides: boolean): boolean | implemented |
IsSpellKnown | Returns true if a player knows a spell.(spellID: number, spellBank: SpellBookSpellBank): boolean | implemented |
IsSpellKnownOrInSpellBook | Returns true if a spell is considered to be known or present in the spellbook(spellID: number, spellBank: SpellBookSpellBank, includeOverrides: boolean): boolean | implemented |
PickupSpellBookItem | Puts the spell in a spellbook slot on the cursor. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank) | implemented |
SetBarSlotFromIntro | Places a newly learned spell on an action bar slot. · by wowlua(spellID: number, slotIndex: number) | guessed |
SetSpellBookItemAutoCastEnabled | Turns autocast of the spell in a spellbook slot on or off. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, enabled: boolean) | guessed |
SpellBookItemHasRange | Returns true if the SpellBookIem has a min and/or max range greater than 0; Will always return false if it is not a spell(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean | guessed |
ToggleSpellBookItemAutoCast | Toggles autocast of the spell in a spellbook slot. · by wowlua(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank) | guessed |
"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.
Events
| event | payload | fired by the emulator |
|---|---|---|
CURRENT_SPELL_CAST_CHANGED | cancelledCast: boolean | implemented |
LEARNED_SPELL_IN_SKILL_LINE | spellID: number, skillLineIndex: number, isGuildPerkSpell: boolean | implemented |
MAX_SPELL_START_RECOVERY_OFFSET_CHANGED | clampedNewQueueWindowMs: number | not implemented |
PLAYER_TOTEM_UPDATE | totemSlot: number | not implemented |
SPELLS_CHANGED | no payload | implemented |
SPELL_FLYOUT_UPDATE | flyoutID: number?, spellID: number?, isLearned: boolean? | implemented |
SPELL_PUSHED_TO_ACTIONBAR | spellID: number, slot: number, page: number | implemented |
SPELL_PUSHED_TO_FLYOUT_ON_ACTIONBAR | spellID: number, flyoutSlot: number, flyoutPage: number | not implemented |
SPELL_UPDATE_CHARGES | no payload | implemented |
SPELL_UPDATE_COOLDOWN | spellID: number?, baseSpellID: number?, category: number?, startRecoveryCategory: number?, itemID: number? | implemented |
SPELL_UPDATE_ICON | spellID: number? | not implemented |
SPELL_UPDATE_USABLE | no payload | implemented |
SPELL_UPDATE_USES | spellID: number, baseSpellID: number? | not implemented |
START_AUTOREPEAT_SPELL | no payload | not implemented |
STOP_AUTOREPEAT_SPELL | no payload | not implemented |
UPDATE_SHAPESHIFT_COOLDOWN | no payload | implemented |
UPDATE_SHAPESHIFT_FORM | no payload | implemented |
UPDATE_SHAPESHIFT_FORMS | no payload | implemented |
UPDATE_SHAPESHIFT_USABLE | no payload | implemented |
An event the emulator doesn't fire on its own can still be fired from a test: mock.fireEvent("MAX_SPELL_START_RECOVERY_OFFSET_CHANGED").
Structures
SpellBookItemInfo· actionID, spellID?, itemType, name, subName, iconID, isPassive, isOffSpec, skillLineIndex?SpellBookSkillLineInfo· name, iconID, itemIndexOffset, numSpellBookItems, isGuild, shouldHide, specID?, offSpecID?
sources
Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (SpellBook system, camelot 1.60.1). Descriptions: warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.