C_SpellBook.IsSpellBookItemUsable

From Warcraft Wiki
Jump to navigation Jump to search

Returns whether the SpellBookIem is currently castable.

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

Arguments

spellBookItemSlotIndex
number - Spellbook slot index, ranging from 1 through the total number of spells across all tabs and pages
spellBookItemSpellBank
Enum.SpellBookSpellBank
Value Field Description
0 Player
1 Pet

Returns

isUsable
boolean - True if the spell is usable, false otherwise. A spell might be unusable for a variety of reasons, such as:
  • The player hasn't learned the spell
  • The player lacks required mana or reagents
  • Reactive conditions haven't been met
insufficientPower
boolean - True if spell is specifically unusable due to insufficient power (i.e., MANA, RAGE, etc)

Patch changes