API types/SpellIdentifier

From Warcraft Wiki
Jump to navigation Jump to search

SpellIdentifier (number|string) can be a Spell ID, name, name(subtext), or link.

  • When passing a localized name it requires the spell to be in your spellbook.

Used by

Global API

C_Spell.DoesSpellExist(spellIdentifier) : spellExists
C_Spell.GetDeadlyDebuffInfo(spellIdentifier) : deadlyDebuffInfo
C_Spell.GetOverrideSpell(spellIdentifier, spec, onlyKnown, ignoreOverrideSpellID) : overrideSpellID
C_Spell.GetSpellAutoCast(spellIdentifier) : autoCastAllowed, autoCastEnabled
C_Spell.GetSpellCastCount(spellIdentifier) : castCount
C_Spell.GetSpellCharges(spellIdentifier) : chargeInfo
C_Spell.GetSpellCooldown(spellIdentifier) : spellCooldownInfo
C_Spell.GetSpellDescription(spellIdentifier) : description
C_Spell.GetSpellIDForSpellIdentifier(spellIdentifier) : spellID
C_Spell.GetSpellInfo(spellIdentifier) : spellInfo
C_Spell.GetSpellLevelLearned(spellIdentifier) : levelLearned
C_Spell.GetSpellLink(spellIdentifier, glyphID) : spellLink
C_Spell.GetSpellLossOfControlCooldown(spellIdentifier) : startTime, duration
C_Spell.GetSpellName(spellIdentifier) : name
C_Spell.GetSpellPowerCost(spellIdentifier) : powerCosts
C_Spell.GetSpellSkillLineAbilityRank(spellIdentifier) : rank
C_Spell.GetSpellSubtext(spellIdentifier) : subtext
C_Spell.GetSpellTexture(spellIdentifier) : iconID, originalIconID
C_Spell.GetSpellTradeSkillLink(spellIdentifier) : spellLink
C_Spell.IsAutoAttackSpell(spellIdentifier) : isAutoAttack
C_Spell.IsAutoRepeatSpell(spellIdentifier) : isAutoRepeat
C_Spell.IsClassTalentSpell(spellIdentifier) : isAutoRepeat
C_Spell.IsCurrentSpell(spellIdentifier) : isCurrentSpell
C_Spell.IsPressHoldReleaseSpell(spellIdentifier) : isPressHoldRelease
C_Spell.IsPvPTalentSpell(spellIdentifier) : isAutoRepeat
C_Spell.IsRangedAutoAttackSpell(spellIdentifier) : isRangedAutoAttack
C_Spell.IsSpellDataCached(spellIdentifier) : isCached
C_Spell.IsSpellDisabled(spellIdentifier) : disabled
C_Spell.IsSpellHarmful(spellIdentifier) : isHarmful
C_Spell.IsSpellHelpful(spellIdentifier) : isHelpful
C_Spell.IsSpellInRange(spellIdentifier, targetUnit) : inRange
C_Spell.IsSpellPassive(spellIdentifier) : isPassive
C_Spell.IsSpellUsable(spellIdentifier) : isUsable, insufficientPower
C_Spell.PickupSpell(spellIdentifier)
C_Spell.RequestLoadSpellData(spellIdentifier)
C_Spell.SetSpellAutoCastEnabled(spellIdentifier, enabled)
C_Spell.SpellHasRange(spellIdentifier) : hasRange
C_Spell.ToggleSpellAutoCast(spellIdentifier)
C_SpellBook.FindSpellBookSlotForSpell(spellIdentifier, includeHidden, includeFlyouts, includeFutureSpells, includeOffSpec) : spellBookItemSlotIndex, spellBookItemSpellBank

Last updated: 11.0.2

Example

-- by spell ID
local spell1 = C_Spell.GetSpellInfo(585)

-- by spell link
local spell2 = C_Spell.GetSpellInfo("|cff71d5ff|Hspell:585:0|h[Smite]|h|r")

-- by spell name (requires Priest and enUS locale)
local spell3 = C_Spell.GetSpellInfo("Smite")