View Single Post
12-20-23, 06:48 AM   #1
Benalish
A Flamescale Wyrmkin
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 123
API IsSpellKnown

From https://wowwiki-archive.fandom.com/w...I_IsSpellKnown

Lua Code:
  1. isKnown = IsSpellKnown(spellID, isPetSpell)

Arguments
spellID: integer - the spell ID number
isPetSpell: boolean (optional) - if true, will check if the currently active pet knows the spell; if false or omitted, will check if the player knows the spell

Returns
isKnown: boolean - whether the player (or pet) knows the given spell

For the spells I know, starting from their name I can get their ID via
Lua Code:
  1. GetSpellLink(name)
But I can't get the ID of a spell I don't know, so is there an alternative way to find out if I know a spell?
  Reply With Quote