v0.13.8

C_SpellBook.GetSpellBookItemCooldown

functionimplementedavailable in: camelot

Returns the cooldown info of a spell.

signaturewowlua
function C_SpellBook.GetSpellBookItemCooldown(    spellBookItemSlotIndex: number,    spellBookItemSpellBank: SpellBookSpellBank): SpellCooldownInfo?

Parameters

nametypedescription
spellBookItemSlotIndexnumberSpellbook slot index, ranging from 1 through the total number of spells across all tabs and pages
spellBookItemSpellBankSpellBookSpellBank

Returns

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

SpellCooldownInfo
fieldtypedescription
startTimenumberIf cooldown is active, time started; 0 if no cooldown; Current time if isEnabled is false
durationnumberCooldown duration in seconds if active; 0 if cooldown is inactive
isEnabledbooleanFalse if cooldown is on hold (ex: some cooldowns only start after an active spell is cancelled); True otherwise
isActivebooleanFalse if cooldown is not active (ex: not enabled, or startTime or duration are 0); True otherwise
modRatenumberRate at which cooldown UI should update
activeCategorynumber?Indicates which category is responsible for determining the duration. A nil value indicates the duration was determined through some other logic, e.g. the spell is on hold.
timeUntilEndOfStartRecoverynumber?When this is set it indicates that the spell is in recovery and this is how long it will be until that recovery period is finished
isOnGCDboolean?Whether or not this spell is considered to be on the global cooldown, do not trust this field unless responding to a SPELL_UPDATE_COOLDOWN event

Blizzard's documentation says it may return nothing.

In wowlua's emulated client

implementedwowlua models the system behind it. what the statuses mean

Restrictions

sources

Signature and flags: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (SpellBook system, camelot 1.60.1). Description: warcraft.wiki.gg's API pages ↗, by its contributors, CC BY-SA 4.0 ↗.