v0.13.8

C_SpellBook

namespaceavailable in: camelot

Status in wowlua

51 functions: 22 implemented, 0 recorded, 29 guessed. 19 events, 12 of them fired by the emulator on its own.

Functions

functionwhat it doesstatus
AbortSpellIntroStops the introduction of a newly learned spell. · by wowlua
(spellID: number)
guessed
CastSpellBookItemCasts the spell in a spellbook slot. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, targetSelf: boolean)
guessed
ContainsAnyDisenchantSpellReturns true if player knows any Disenchant spells.
(): boolean
guessed
FindBaseSpellByIDReturns the ID of the base spell of the given spell, or nil when the spell is unknown. · by wowlua
(spellID: number): number?
implemented
FindFlyoutSlotBySpellIDReturns the spellbook slot of the flyout that holds the given spell. · by wowlua
(spellID: number): number
guessed
FindSpellBookSlotForSpellIf 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
FindSpellOverrideByIDReturns 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
GetClassSkillLineInfoReturns the spellbook skill line of the player's class. · by wowlua
(): SpellBookSkillLineInfo?
implemented
GetCurrentLevelSpellsReturns general, class, and active spec spells that are learned at the specified level.
(level: number): number[]?
guessed
GetNumSpellBookSkillLinesReturns the number of tabs in the spellbook.
(): number
implemented
GetSkillLineIndexByIDReturns the spellbook index of the given skill line. · by wowlua
(skillLineID: number): number?
guessed
GetSpellBookItemAutoCastReturns nothing if item doesn't exist or isn't a spell
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (boolean?, boolean?)
implemented
GetSpellBookItemCastCountReturns 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
GetSpellBookItemChargeDurationReturns a duration object describing the active recharge time for a spellbook item.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): LuaDurationObject?
guessed
GetSpellBookItemChargesReturns 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
GetSpellBookItemCooldownReturns the cooldown info of a spell.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellCooldownInfo?
implemented
GetSpellBookItemCooldownDurationReturns a duration object describing the active cooldown duration for a spellbook item.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, ignoreGCD: boolean): LuaDurationObject?
guessed
GetSpellBookItemDescriptionReturns the description of the spell in a spellbook slot. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): string?
guessed
GetSpellBookItemInfoReturns info for a spellbook item.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellBookItemInfo?
implemented
GetSpellBookItemLevelLearnedReturns 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
GetSpellBookItemLinkReturns a chat link for the spell in a spellbook slot. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, glyphID: number?): string?
implemented
GetSpellBookItemLossOfControlCooldownDurationReturns a duration object describing the active loss of control cooldown duration for a spellbook item.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): LuaDurationObject?
guessed
GetSpellBookItemLossOfControlCooldownInfoReturns 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
GetSpellBookItemNameReturns the name of a spellbook item.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (string?, string?)
implemented
GetSpellBookItemPowerCostReturns a table containing one or more SpellPowerCostInfos, one for each power type a SpellBookItem costs.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): SpellPowerCostInfo[]?
guessed
GetSpellBookItemSkillLineIndexGet the index of the SkillLine this SpellBookItem is part of
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): number?
guessed
GetSpellBookItemTextureReturns the icon texture of the spell in a spellbook slot. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): number?
implemented
GetSpellBookItemTradeSkillLinkReturns nil if SpellBookItem is not associated with a trade skill
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): string?
guessed
GetSpellBookItemTypeReturns the type of the entry in a spellbook slot and its IDs. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (SpellBookItemType?, number?, number?)
implemented
GetSpellBookSkillLineInfoReturns info for the specified spellbook skill line.
(skillLineIndex: number): SpellBookSkillLineInfo?
implemented
HasPetSpellsReturns the number of available abilities for the player's combat pet.
(): (number?, string?)
implemented
IsAutoAttackSpellBookItemReturns true if the SpellBookItem is the player's melee Auto Attack spell
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsClassTalentSpellBookItemReturns true if the SpellBookItem comes from a Class Talent
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsPvPTalentSpellBookItemReturns true if the SpellBookItem comes from a PvP Talent
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsRangedAutoAttackSpellBookItemReturns true if the SpellBookItem is the player's ranged Auto Attack spell (ex: Shoot, Auto Shot, etc)
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsSpellBookItemHarmfulReturns true if the SpellBookIem can be cast on hostile targets
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsSpellBookItemHelpfulReturns true if the SpellBookIem can be cast on the player or other friendly targets
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsSpellBookItemInRangeReturns 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
IsSpellBookItemLooseFlyoutMemberReturns true if the SpellBookItem is represented in a Flyout.
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
implemented
IsSpellBookItemLowRankReturns 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
IsSpellBookItemOffSpecReturns true if the SpellBookItem belongs to a non-active class specialization
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
guessed
IsSpellBookItemPassiveReturns true if the SpellBookItem is a passive spell; Will always return false if it is not a spell
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): boolean
implemented
IsSpellBookItemUsableReturns whether the SpellBookItem is currently castable; Typically based on things like learned status, required resources, etc
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank): (boolean, boolean)
guessed
IsSpellInSpellBookReturns 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
IsSpellKnownReturns true if a player knows a spell.
(spellID: number, spellBank: SpellBookSpellBank): boolean
implemented
IsSpellKnownOrInSpellBookReturns true if a spell is considered to be known or present in the spellbook
(spellID: number, spellBank: SpellBookSpellBank, includeOverrides: boolean): boolean
implemented
PickupSpellBookItemPuts the spell in a spellbook slot on the cursor. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank)
implemented
SetBarSlotFromIntroPlaces a newly learned spell on an action bar slot. · by wowlua
(spellID: number, slotIndex: number)
guessed
SetSpellBookItemAutoCastEnabledTurns autocast of the spell in a spellbook slot on or off. · by wowlua
(spellBookItemSlotIndex: number, spellBookItemSpellBank: SpellBookSpellBank, enabled: boolean)
guessed
SpellBookItemHasRangeReturns 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
ToggleSpellBookItemAutoCastToggles 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

eventpayloadfired by the emulator
CURRENT_SPELL_CAST_CHANGEDcancelledCast: booleanimplemented
LEARNED_SPELL_IN_SKILL_LINEspellID: number, skillLineIndex: number, isGuildPerkSpell: booleanimplemented
MAX_SPELL_START_RECOVERY_OFFSET_CHANGEDclampedNewQueueWindowMs: numbernot implemented
PLAYER_TOTEM_UPDATEtotemSlot: numbernot implemented
SPELLS_CHANGEDno payloadimplemented
SPELL_FLYOUT_UPDATEflyoutID: number?, spellID: number?, isLearned: boolean?implemented
SPELL_PUSHED_TO_ACTIONBARspellID: number, slot: number, page: numberimplemented
SPELL_PUSHED_TO_FLYOUT_ON_ACTIONBARspellID: number, flyoutSlot: number, flyoutPage: numbernot implemented
SPELL_UPDATE_CHARGESno payloadimplemented
SPELL_UPDATE_COOLDOWNspellID: number?, baseSpellID: number?, category: number?, startRecoveryCategory: number?, itemID: number?implemented
SPELL_UPDATE_ICONspellID: number?not implemented
SPELL_UPDATE_USABLEno payloadimplemented
SPELL_UPDATE_USESspellID: number, baseSpellID: number?not implemented
START_AUTOREPEAT_SPELLno payloadnot implemented
STOP_AUTOREPEAT_SPELLno payloadnot implemented
UPDATE_SHAPESHIFT_COOLDOWNno payloadimplemented
UPDATE_SHAPESHIFT_FORMno payloadimplemented
UPDATE_SHAPESHIFT_FORMSno payloadimplemented
UPDATE_SHAPESHIFT_USABLEno payloadimplemented

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.