# C_SpellBook: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_SpellBook

## Functions

### C_SpellBook.AbortSpellIntro

```lua
C_SpellBook.AbortSpellIntro(spellID)
```

Arguments:
- `spellID`: number

### C_SpellBook.CastSpellBookItem

```lua
C_SpellBook.CastSpellBookItem(spellBookItemSlotIndex, spellBookItemSpellBank, [targetSelf])
```

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank
- `targetSelf`: bool, default false. If true, spell will target the current player; Otherwise, targets the player's current target

### C_SpellBook.ContainsAnyDisenchantSpell

```lua
contains = C_SpellBook.ContainsAnyDisenchantSpell()
```

Returns true if player knows any Disenchant spells

Returns:
- `contains`: bool

### C_SpellBook.FindBaseSpellByID

```lua
baseSpellID = C_SpellBook.FindBaseSpellByID(spellID)
```

Arguments:
- `spellID`: number

Returns:
- `baseSpellID`: number, may be nil

### C_SpellBook.FindFlyoutSlotBySpellID

```lua
flyoutSlot = C_SpellBook.FindFlyoutSlotBySpellID(spellID)
```

Arguments:
- `spellID`: number

Returns:
- `flyoutSlot`: luaIndex

### C_SpellBook.FindSpellBookSlotForSpell

```lua
spellBookItemSlotIndex, spellBookItemSpellBank = C_SpellBook.FindSpellBookSlotForSpell(spellIdentifier, [includeHidden], [includeFlyouts], [includeFutureSpells], [includeOffSpec])
```

If found, returns the first slot position of a SpellBookItem matching the specified spell and criteria

May return nothing.

Arguments:
- `spellIdentifier`: SpellIdentifier
- `includeHidden`: bool, default false. If true, search includes SpellBookItems that are hidden from the SpellBook UI (ex: spells that have been replaced, are also in a Flyout, etc)
- `includeFlyouts`: bool, default true. If true, search includes Flyout SpellBookItems containing the specified spell
- `includeFutureSpells`: bool, default false. If true, search includes SpellBookItems for spells that have not yet been learned
- `includeOffSpec`: bool, default false. If true, search includes SpellBookItems belonging to non-active specializations; If spell is in active and inactive spec, the active spec slot will always be returned

Returns:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

### C_SpellBook.FindSpellOverrideByID

```lua
overrideSpellID = C_SpellBook.FindSpellOverrideByID(spellID)
```

Arguments:
- `spellID`: number

Returns:
- `overrideSpellID`: number, may be nil

### C_SpellBook.GetClassSkillLineInfo

```lua
skillLineInfo = C_SpellBook.GetClassSkillLineInfo()
```

May return nothing.

Returns:
- `skillLineInfo`: SpellBookSkillLineInfo

### C_SpellBook.GetCurrentLevelSpells

```lua
spellIDs = C_SpellBook.GetCurrentLevelSpells(level)
```

Returns general, class, and active spec spells that are learned at the specified level

May return nothing.

Arguments:
- `level`: number

Returns:
- `spellIDs`: number[]

### C_SpellBook.GetNumSpellBookSkillLines

```lua
numSpellBookSkillLines = C_SpellBook.GetNumSpellBookSkillLines()
```

Returns:
- `numSpellBookSkillLines`: number

### C_SpellBook.GetSkillLineIndexByID

```lua
skillIndex = C_SpellBook.GetSkillLineIndexByID(skillLineID)
```

Arguments:
- `skillLineID`: number

Returns:
- `skillIndex`: luaIndex, may be nil. Will be nil if the specified SkillLine could not be found, or if it is not one of the player's tracked skill lines

### C_SpellBook.GetSpellBookItemAutoCast

```lua
autoCastAllowed, autoCastEnabled = C_SpellBook.GetSpellBookItemAutoCast(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns nothing if item doesn't exist or isn't a spell

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `autoCastAllowed`: bool. True if this spell is allowed to be auto-cast
- `autoCastEnabled`: bool. True if auto-casting this spell is currently enabled (usually by the player)

### C_SpellBook.GetSpellBookItemCastCount

```lua
castCount = C_SpellBook.GetSpellBookItemCastCount(spellBookItemSlotIndex, spellBookItemSpellBank)
```

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

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `castCount`: number

### C_SpellBook.GetSpellBookItemChargeDuration

```lua
duration = C_SpellBook.GetSpellBookItemChargeDuration(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns a duration object describing the active recharge time for a spellbook item.

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `duration`: LuaDurationObject

### C_SpellBook.GetSpellBookItemCharges

```lua
chargeInfo = C_SpellBook.GetSpellBookItemCharges(spellBookItemSlotIndex, spellBookItemSpellBank)
```

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

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `chargeInfo`: SpellChargeInfo

### C_SpellBook.GetSpellBookItemCooldown

```lua
spellCooldownInfo = C_SpellBook.GetSpellBookItemCooldown(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns nil if item doesn't exist or if this kind of item doesn't display cooldowns (ex: future or offspec spells)

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `spellCooldownInfo`: SpellCooldownInfo

### C_SpellBook.GetSpellBookItemCooldownDuration

```lua
duration = C_SpellBook.GetSpellBookItemCooldownDuration(spellBookItemSlotIndex, spellBookItemSpellBank, [ignoreGCD])
```

Returns a duration object describing the active cooldown duration for a spellbook item.

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank
- `ignoreGCD`: bool, default false

Returns:
- `duration`: LuaDurationObject

### C_SpellBook.GetSpellBookItemDescription

```lua
description = C_SpellBook.GetSpellBookItemDescription(spellBookItemSlotIndex, spellBookItemSpellBank)
```

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `description`: string. May be empty if spell's data isn't loaded yet; Listen for SPELL_TEXT_UPDATE event, or use SpellMixin to load asynchronously

### C_SpellBook.GetSpellBookItemInfo

```lua
spellBookItemInfo = C_SpellBook.GetSpellBookItemInfo(spellBookItemSlotIndex, spellBookItemSpellBank)
```

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `spellBookItemInfo`: SpellBookItemInfo

### C_SpellBook.GetSpellBookItemLevelLearned

```lua
levelLearned = C_SpellBook.GetSpellBookItemLevelLearned(spellBookItemSlotIndex, spellBookItemSpellBank)
```

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

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `levelLearned`: number

### C_SpellBook.GetSpellBookItemLink

```lua
spellLink = C_SpellBook.GetSpellBookItemLink(spellBookItemSlotIndex, spellBookItemSpellBank, [glyphID])
```

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank
- `glyphID`: number, may be nil

Returns:
- `spellLink`: string

### C_SpellBook.GetSpellBookItemLossOfControlCooldownDuration

```lua
duration = C_SpellBook.GetSpellBookItemLossOfControlCooldownDuration(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns a duration object describing the active loss of control cooldown duration for a spellbook item.

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `duration`: LuaDurationObject

### C_SpellBook.GetSpellBookItemLossOfControlCooldownInfo

```lua
lossOfControlInfo = C_SpellBook.GetSpellBookItemLossOfControlCooldownInfo(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns nil if item doesn't exist or if this kind of item doesn't display cooldowns (ex: future or offspec spells)

May return nothing.

Its returns can be secret values (in some instances and fights): guard them before any arithmetic.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `lossOfControlInfo`: SpellLossOfControlInfo

### C_SpellBook.GetSpellBookItemName

```lua
name, subName = C_SpellBook.GetSpellBookItemName(spellBookItemSlotIndex, spellBookItemSpellBank)
```

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `name`: string
- `subName`: string. May be empty if spell's data isn't loaded yet; Listen for SPELL_TEXT_UPDATE event, or use SpellMixin to load asynchronously

### C_SpellBook.GetSpellBookItemPowerCost

```lua
powerCosts = C_SpellBook.GetSpellBookItemPowerCost(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns a table containing one or more SpellPowerCostInfos, one for each power type a SpellBookItem costs; May return nil if item is not found or has no resource costs

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `powerCosts`: SpellPowerCostInfo[]

### C_SpellBook.GetSpellBookItemSkillLineIndex

```lua
skillLineIndex = C_SpellBook.GetSpellBookItemSkillLineIndex(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Get the index of the SkillLine this SpellBookItem is part of

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `skillLineIndex`: luaIndex, may be nil. Will be nil if the specified SpellBookItem doesn't exist or isn't part of a SkillLine

### C_SpellBook.GetSpellBookItemTexture

```lua
iconID = C_SpellBook.GetSpellBookItemTexture(spellBookItemSlotIndex, spellBookItemSpellBank)
```

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `iconID`: fileID

### C_SpellBook.GetSpellBookItemTradeSkillLink

```lua
spellLink = C_SpellBook.GetSpellBookItemTradeSkillLink(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns nil if SpellBookItem is not associated with a trade skill

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `spellLink`: string

### C_SpellBook.GetSpellBookItemType

```lua
itemType, actionID, spellID = C_SpellBook.GetSpellBookItemType(spellBookItemSlotIndex, spellBookItemSpellBank)
```

May return nothing.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `itemType`: SpellBookItemType
- `actionID`: number. Represents a base spellID for spells, flyoutID for flyouts, or petActionID for pet actions
- `spellID`: number, may be nil. May be nil if item is not a spell; Will be the overriding spellID if spell is overriden, otherwise will match actionID

### C_SpellBook.GetSpellBookSkillLineInfo

```lua
skillLineInfo = C_SpellBook.GetSpellBookSkillLineInfo(skillLineIndex)
```

May return nothing.

Arguments:
- `skillLineIndex`: luaIndex

Returns:
- `skillLineInfo`: SpellBookSkillLineInfo

### C_SpellBook.HasPetSpells

```lua
numPetSpells, petNameToken = C_SpellBook.HasPetSpells()
```

Returns nothing if player has no pet spells

May return nothing.

Returns:
- `numPetSpells`: number
- `petNameToken`: string

### C_SpellBook.IsAutoAttackSpellBookItem

```lua
isAutoAttack = C_SpellBook.IsAutoAttackSpellBookItem(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem is the player's melee Auto Attack spell

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isAutoAttack`: bool

### C_SpellBook.IsClassTalentSpellBookItem

```lua
isClassTalent = C_SpellBook.IsClassTalentSpellBookItem(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem comes from a Class Talent

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isClassTalent`: bool

### C_SpellBook.IsPvPTalentSpellBookItem

```lua
isPvPTalent = C_SpellBook.IsPvPTalentSpellBookItem(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem comes from a PvP Talent

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isPvPTalent`: bool

### C_SpellBook.IsRangedAutoAttackSpellBookItem

```lua
isRangedAutoAttack = C_SpellBook.IsRangedAutoAttackSpellBookItem(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem is the player's ranged Auto Attack spell (ex: Shoot, Auto Shot, etc)

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isRangedAutoAttack`: bool

### C_SpellBook.IsSpellBookItemHarmful

```lua
isHarmful = C_SpellBook.IsSpellBookItemHarmful(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookIem can be cast on hostile targets

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isHarmful`: bool

### C_SpellBook.IsSpellBookItemHelpful

```lua
isHelpful = C_SpellBook.IsSpellBookItemHelpful(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookIem can be cast on the player or other friendly targets

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isHelpful`: bool

### C_SpellBook.IsSpellBookItemInRange

```lua
inRange = C_SpellBook.IsSpellBookItemInRange(spellBookItemSlotIndex, spellBookItemSpellBank, [targetUnit])
```

Returns true if the current target is within range of the SpellBookIem; False if out of range; Nil if range check was invalid

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank
- `targetUnit`: UnitToken, may be nil. Optional specific target; If not supplied, player's current target (if any) will be used

Returns:
- `inRange`: bool, may be nil. May be nil if the range check was invalid, ie due to unknown/invalid spell, missing/invalid target, etc

### C_SpellBook.IsSpellBookItemLooseFlyoutMember

```lua
isFlyoutMember = C_SpellBook.IsSpellBookItemLooseFlyoutMember(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem is represented in a Flyout.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isFlyoutMember`: bool

### C_SpellBook.IsSpellBookItemLowRank

```lua
isLowRank = C_SpellBook.IsSpellBookItemLowRank(spellBookItemSlotIndex, spellBookItemSpellBank)
```

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.

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isLowRank`: bool

### C_SpellBook.IsSpellBookItemOffSpec

```lua
isOffSpec = C_SpellBook.IsSpellBookItemOffSpec(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem belongs to a non-active class specialization

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isOffSpec`: bool

### C_SpellBook.IsSpellBookItemPassive

```lua
isPassive = C_SpellBook.IsSpellBookItemPassive(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns true if the SpellBookItem is a passive spell; Will always return false if it is not a spell

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isPassive`: bool

### C_SpellBook.IsSpellBookItemUsable

```lua
isUsable, insufficientPower = C_SpellBook.IsSpellBookItemUsable(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Returns whether the SpellBookIem is currently castable; Typically based on things like learned status, required resources, etc

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `isUsable`: bool
- `insufficientPower`: bool. True if SpellBookIem is specifically unusable due to insufficient power (ie MANA, RAGE, etc)

### C_SpellBook.IsSpellInSpellBook

```lua
isInSpellBook = C_SpellBook.IsSpellInSpellBook(spellID, [spellBank], [includeOverrides])
```

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

Arguments:
- `spellID`: number
- `spellBank`: SpellBookSpellBank, default "Player"
- `includeOverrides`: bool, default true

Returns:
- `isInSpellBook`: bool

### C_SpellBook.IsSpellKnown

```lua
isKnown = C_SpellBook.IsSpellKnown(spellID, [spellBank])
```

Returns true if a player knows a spell. This function can also return true for spells that aren't in the spellbook, such as temporarily-granted abilities

Arguments:
- `spellID`: number
- `spellBank`: SpellBookSpellBank, default "Player"

Returns:
- `isKnown`: bool

### C_SpellBook.IsSpellKnownOrInSpellBook

```lua
isKnownOrInSpellBook = C_SpellBook.IsSpellKnownOrInSpellBook(spellID, [spellBank], [includeOverrides])
```

Returns true if a spell is considered to be known or present in the spellbook

Arguments:
- `spellID`: number
- `spellBank`: SpellBookSpellBank, default "Player"
- `includeOverrides`: bool, default true

Returns:
- `isKnownOrInSpellBook`: bool

### C_SpellBook.PickupSpellBookItem

```lua
C_SpellBook.PickupSpellBookItem(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

### C_SpellBook.SetBarSlotFromIntro

```lua
C_SpellBook.SetBarSlotFromIntro(spellID, slotIndex)
```

Arguments:
- `spellID`: number
- `slotIndex`: luaIndex

### C_SpellBook.SetSpellBookItemAutoCastEnabled

```lua
C_SpellBook.SetSpellBookItemAutoCastEnabled(spellBookItemSlotIndex, spellBookItemSpellBank, enabled)
```

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank
- `enabled`: bool

### C_SpellBook.SpellBookItemHasRange

```lua
hasRange = C_SpellBook.SpellBookItemHasRange(spellBookItemSlotIndex, spellBookItemSpellBank)
```

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

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

Returns:
- `hasRange`: bool

### C_SpellBook.ToggleSpellBookItemAutoCast

```lua
C_SpellBook.ToggleSpellBookItemAutoCast(spellBookItemSlotIndex, spellBookItemSpellBank)
```

Arguments:
- `spellBookItemSlotIndex`: luaIndex
- `spellBookItemSpellBank`: SpellBookSpellBank

## Events

### CURRENT_SPELL_CAST_CHANGED

Payload, after the event's name:
- `cancelledCast`: bool

### LEARNED_SPELL_IN_SKILL_LINE

Payload, after the event's name:
- `spellID`: number
- `skillLineIndex`: luaIndex
- `isGuildPerkSpell`: bool

### MAX_SPELL_START_RECOVERY_OFFSET_CHANGED

Payload, after the event's name:
- `clampedNewQueueWindowMs`: number

### PLAYER_TOTEM_UPDATE

Payload, after the event's name:
- `totemSlot`: luaIndex

### SPELL_FLYOUT_UPDATE

Payload, after the event's name:
- `flyoutID`: number, may be nil
- `spellID`: number, may be nil
- `isLearned`: bool, may be nil

### SPELL_PUSHED_TO_ACTIONBAR

Payload, after the event's name:
- `spellID`: number
- `slot`: luaIndex
- `page`: luaIndex

### SPELL_PUSHED_TO_FLYOUT_ON_ACTIONBAR

Payload, after the event's name:
- `spellID`: number
- `flyoutSlot`: luaIndex
- `flyoutPage`: luaIndex

### SPELL_UPDATE_CHARGES

No payload.

### SPELL_UPDATE_COOLDOWN

Payload, after the event's name:
- `spellID`: number, may be nil. Can be a base spell or an override spell. A nil value indicates that all cooldowns should be updated, rather than just a specific one.
- `baseSpellID`: number, may be nil. Will be set to the base spell if the spellID parameter is an override spell.
- `category`: number, may be nil. If the spellID parameter is set, the cooldown category of the spell. A nil value indicates the spell does not have a cooldown category.
- `startRecoveryCategory`: number, may be nil. If the spellID parameter is set, the cooldown start recovery category of the spell. A nil value indicates the spell does not have a cooldown start recovery category.
- `itemID`: number, may be nil. If the itemID parameter is set, it's the itemID associated with the cast of the spell.

### SPELL_UPDATE_ICON

Payload, after the event's name:
- `spellID`: number, may be nil. Always refers to the base spell. A nil value indicates that all icons should be updated, rather than just a specific one.

### SPELL_UPDATE_USABLE

No payload.

### SPELL_UPDATE_USES

Payload, after the event's name:
- `spellID`: number. Can be a base spell or override spell.
- `baseSpellID`: number, may be nil. Will be set to the base spell if the spellID parameter is an override spell.

### SPELLS_CHANGED

No payload.

### START_AUTOREPEAT_SPELL

No payload.

### STOP_AUTOREPEAT_SPELL

No payload.

### UPDATE_SHAPESHIFT_COOLDOWN

No payload.

### UPDATE_SHAPESHIFT_FORM

No payload.

### UPDATE_SHAPESHIFT_FORMS

No payload.

### UPDATE_SHAPESHIFT_USABLE

No payload.

## Tables

### SpellBookItemInfo (structure)

- `actionID`: number. Represents a base spellID for spells, flyoutID for flyouts, or petActionID for pet actions
- `spellID`: number, may be nil. May be nil if item is not a spell; Will be the overriding spellID if spell is overriden, otherwise will match actionID
- `itemType`: SpellBookItemType
- `name`: string
- `subName`: string. May be empty if flyout, or if spell's data isn't loaded yet; Listen for SPELL_TEXT_UPDATE event, or use SpellMixin to load asynchronously
- `iconID`: fileID
- `isPassive`: bool. True if the item is a passive spell; Will always be false if it is not a spell
- `isOffSpec`: bool. True if the item belongs to a non-active specialization
- `skillLineIndex`: luaIndex, may be nil. Index of the SkillLine this SpellBookItem is part of; Nil this SpellBookItem isn't part of a SkillLine

### SpellBookSkillLineInfo (structure)

- `name`: string
- `iconID`: fileID
- `itemIndexOffset`: number. This value + 1 is the first Spell Book Item slotIndex within this skill line
- `numSpellBookItems`: number
- `isGuild`: bool
- `shouldHide`: bool
- `specID`: number, may be nil. Will be nil if this skill line is not associated with a specialization
- `offSpecID`: number, may be nil. Will be nil if this skill line is not associated with a non-active specialization

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
