C_Spell
namespaceavailable in: camelotStatus in wowlua
71 functions: 22 implemented, 7 recorded, 42 guessed. 6 events, 2 of them fired by the emulator on its own.
Functions
| function | what it does | status |
|---|---|---|
CancelAutoRepeatSpell | Cancels the player's active auto repeat spell, if any(): boolean | guessed |
CancelItemTempEnchantment | Cancel a temporary enchantment on an item(weaponSlot: WeaponSlot, enchantmentType: ItemEnchantType) | guessed |
CancelSpellByID | Cancels the given spell. · by wowlua(spellID: number) | guessed |
DoesSpellExist | Returns true if the spell exists, regardless of whether the player has learned it(spellIdentifier: SpellIdentifier): boolean | implemented |
EnableSpellRangeCheck | Used in conjunction with SpellRangeCheckUpdate to inform the UI when a spell goes in or out of range with the current target.(spellIdentifier: SpellIdentifier, enable: boolean) | guessed |
GetAuraStatChanges | Returns the health and power changes the given spell's aura applies. · by wowlua(spellID: number): (number, PowerTypeChange[]) | guessed |
GetBaseSpell | Returns the ID of the base spell that the given spell overrides, or the spell's own ID when it overrides none. · by wowlua(spellIdentifier: SpellIdentifier, spec: number): number | implemented |
GetDeadlyDebuffInfo | Returns information about the given spell as a deadly debuff. · by wowlua(spellIdentifier: SpellIdentifier): DeadlyDebuffInfo? | guessed |
GetItemCooldown | Returns nil if the item is not found or on cooldown(itemID: number): SpellCooldownInfo? | guessed |
GetItemModifiedAppearancesApplied | Returns the IDs of the item appearances the given spell applies. · by wowlua(spellID: number): number[] | guessed |
GetLastCategoryCooldownSource | Searches for the most recent spellID and itemID that started a cooldown in this category(spellCategory: number): (number?, number?) | guessed |
GetMawPowerLinkBySpellID | Returns a chat link for the Torghast power with the given spell. · by wowlua(spellID: SpellIdentifier): string? | guessed |
GetMawPowerRarityInfoBySpellID | Returns the rarity of the Torghast power with the given spell. · by wowlua(spellID: SpellIdentifier): (number?, string?) | recorded |
GetOverrideSpell | Returns the ID for the override spell.(spellIdentifier: SpellIdentifier, spec: number, onlyKnown: boolean, ignoreOverrideSpellID: number): number | implemented |
GetSchoolString | Returns the display name of the given spell school mask, such as "Fire". · by wowlua(schoolMask: number): string | implemented |
GetSpellAutoCast | Returns nil if spell is not found(spellIdentifier: SpellIdentifier): (boolean?, boolean?) | guessed |
GetSpellCastCount | Returns number of times a spell can be cast, typically based on availability of things like required reagent items; Returns 0 if spell is not found(spellIdentifier: SpellIdentifier): number | guessed |
GetSpellChargeDuration | Returns a duration object describing the active recharge time for a spell.(spellIdentifier: SpellIdentifier): LuaDurationObject? | guessed |
GetSpellCharges | Returns a table of info about the charges of a charge-accumulating spell; May return nil if spell is not found or is not charge-based(spellIdentifier: SpellIdentifier): SpellChargeInfo? | implemented |
GetSpellCooldown | Returns the cooldown info of a spell.(spellIdentifier: SpellIdentifier): SpellCooldownInfo? | implemented |
GetSpellCooldownDuration | Returns a duration object describing the active cooldown duration for a spell.(spellIdentifier: SpellIdentifier, ignoreGCD: boolean): LuaDurationObject? | guessed |
GetSpellDescription | Returns nil if spell is not found(spellIdentifier: SpellIdentifier): string? | implemented |
GetSpellDescriptionForItemLocation | Returns nil if spell is not found(spellIdentifier: SpellIdentifier, itemLocation: ItemLocationMixin): string? | guessed |
GetSpellDisplayCount | Depending on the spell, return a string that is either the use count or number of charges. If value is beyond the display count parameter, returns the replacementString (defaults to '*').(spellIdentifier: SpellIdentifier, maxDisplayCount: number, replacementString: string): string | guessed |
GetSpellIDForSpellIdentifier | Returns the spell ID for a given SpellIdentifier.(spellIdentifier: SpellIdentifier): number? | implemented |
GetSpellInfo | Returns spell info.(spellIdentifier: SpellIdentifier): SpellInfo? | implemented |
GetSpellLevelLearned | Returns the level the spell is learned at; May return a different value if the player is currently Level Linked with another player(spellIdentifier: SpellIdentifier): number | implemented |
GetSpellLink | Returns the hyperlink for a spell.(spellIdentifier: SpellIdentifier, glyphID: number?): string? | implemented |
GetSpellLossOfControlCooldownDuration | Returns a duration object describing the active loss of control cooldown duration for a spell.(spellIdentifier: SpellIdentifier): LuaDurationObject? | guessed |
GetSpellLossOfControlCooldownInfo | Returns nil if spell is not found(spellIdentifier: SpellIdentifier): SpellLossOfControlInfo? | guessed |
GetSpellMaxCumulativeAuraApplications | Returns the maximum number of stacks of the given spell's aura. · by wowlua(spellID: SpellIdentifier): number | guessed |
GetSpellName | Returns nil if spell is not found(spellIdentifier: SpellIdentifier): string? | implemented |
GetSpellPowerCost | Returns a table containing one or more SpellPowerCostInfos, one for each power type this spell costs(spellIdentifier: SpellIdentifier): SpellPowerCostInfo[]? | implemented |
GetSpellQueueWindow | Returns the spell queue window in milliseconds, from the SpellQueueWindow setting. · by wowlua(): number | guessed |
GetSpellSkillLineAbilityRank | Returns the rank of a spell that corresponds to an ability within a ranked SkillLine (ex: a crafting Recipe); Returns nil if spell is not found, or isn't part of a ranked SkillLine(spellIdentifier: SpellIdentifier): number? | guessed |
GetSpellSubtext | Returns nil if spell is not found(spellIdentifier: SpellIdentifier): string? | implemented |
GetSpellTexture | Returns nothing if spell is not found(spellIdentifier: SpellIdentifier): (number?, number?, number?) | implemented |
GetSpellTradeSkillLink | Returns nil if spell is not associated with a trade skill(spellIdentifier: SpellIdentifier): string? | guessed |
GetTargetSpellID | Returns the ID of the spell waiting for the player to pick a target. · by wowlua(): number | recorded |
GetVisibilityInfo | Returns how the given spell's aura is shown: whether it has custom visibility, whether the player's own is always shown, and whether it is shown for the player's specialization. · by wowlua(spellID: number, visibilityType: SpellAuraVisibilityType): (boolean?, boolean?, boolean?) | guessed |
IsActiveSpell | Returns true if the spell is a currently active toggled spell(spellIdentifier: SpellIdentifier, targetUnit: string?): boolean | guessed |
IsAutoAttackSpell | Returns true if the spell is the player's melee Auto Attack spell(spellIdentifier: SpellIdentifier): boolean | implemented |
IsAutoRepeatSpell | Returns true if the spell is an auto repeat player spell(spellIdentifier: SpellIdentifier): boolean | guessed |
IsClassTalentSpell | Returns true if the spell comes from a Class Talent(spellIdentifier: SpellIdentifier): boolean | guessed |
IsConsumableSpell | Whether the given spell consumes an item or reagent. · by wowlua(spellIdentifier: SpellIdentifier): boolean | guessed |
IsCurrentSpell | Returns true if the spell is currently being cast or is queued to be cast(spellIdentifier: SpellIdentifier): boolean | implemented |
IsExternalDefensive | Returns true if an aura is considered an external defensive.(spellID: number): boolean | guessed |
IsPressHoldReleaseSpell | Returns true if the spell is an 'empower' type spell that is cast by pressing and holding, with the on-release cast typically being affected by time held(spellIdentifier: SpellIdentifier): boolean | implemented |
IsPriorityAura | Returns true if an aura is considered high priority and should be ordered ahead of other auras in the UI.(spellID: number): boolean | guessed |
IsPvPTalentSpell | Returns true if the spell comes from a PvP Talent(spellIdentifier: SpellIdentifier): boolean | guessed |
IsRangedAutoAttackSpell | Returns true if the spell is the player's ranged Auto Attack spell (ex: Shoot, Auto Shot, etc)(spellIdentifier: SpellIdentifier): boolean | implemented |
IsSelfBuff | Returns true if an aura only applies effects to the player, and no other units.(spellID: number): boolean | guessed |
IsSpellCrowdControl | Returns true if the spell causes a crowd control effect when cast on a valid target.(spellIdentifier: SpellIdentifier): boolean | guessed |
IsSpellDataCached | Returns true if data for the spell has already been loaded and cached this session(spellIdentifier: SpellIdentifier): boolean | implemented |
IsSpellDisabled | Whether the given spell is disabled. · by wowlua(spellIdentifier: SpellIdentifier): boolean | guessed |
IsSpellHarmful | Returns true if the spell can be cast on hostile targets(spellIdentifier: SpellIdentifier): boolean | guessed |
IsSpellHelpful | Returns true if the spell can be cast on the player or other friendly targets(spellIdentifier: SpellIdentifier): boolean | guessed |
IsSpellImportant | Returns true if the spell is considered important. For example a spell that's lethal if not interrupted would be considered important.(spellIdentifier: SpellIdentifier): boolean | guessed |
IsSpellInRange | Returns true if the current target is within range of the spell; False if out of range; Nil if range check was invalid(spellIdentifier: SpellIdentifier, targetUnit: string?): boolean? | guessed |
IsSpellPassive | Whether the given spell is passive. · by wowlua(spellIdentifier: SpellIdentifier): boolean | recorded |
IsSpellUsable | Returns whether the spell is currently castable.(spellIdentifier: SpellIdentifier): (boolean, boolean) | guessed |
PickupSpell | Puts the given spell on the cursor. · by wowlua(spellIdentifier: SpellIdentifier) | implemented |
PlaceTargetingSpellAtCursor | Places the spell waiting for a target at the cursor's position. · by wowlua() | guessed |
RequestLoadSpellData | Requests spell data and fires SPELL_DATA_LOAD_RESULT.(spellIdentifier: SpellIdentifier) | implemented |
SetSpellAutoCastEnabled | Turns autocast of the given spell on or off. · by wowlua(spellIdentifier: SpellIdentifier, enabled: boolean) | guessed |
SpellHasRange | Returns true if the spell has a min and/or max range greater than 0(spellIdentifier: SpellIdentifier): boolean | guessed |
TargetSpellChecksItemCondition | Whether the spell waiting for a target checks a condition of the targeted item. · by wowlua(): boolean | recorded |
TargetSpellIsEnchanting | Whether the spell waiting for a target is an enchantment. · by wowlua(): boolean | recorded |
TargetSpellJumpsUpgradeTrack | Whether the spell waiting for a target moves an item to another upgrade track. · by wowlua(): boolean | recorded |
TargetSpellReplacesBonusTree | Whether the spell waiting for a target replaces an item's bonus tree. · by wowlua(): boolean | recorded |
ToggleSpellAutoCast | Toggles whether spell's autoCast is enabled(spellIdentifier: SpellIdentifier) | guessed |
"by wowlua": no one documents this function, so wowlua wrote the description from its name, signature and behaviour.
Events
| event | payload | fired by the emulator |
|---|---|---|
ENCHANT_SPELL_COMPLETED | successful: boolean, enchantedItem: ItemLocationMixin? | implemented |
ENCHANT_SPELL_SELECTED | no payload | not implemented |
SPELL_DATA_LOAD_RESULT | spellID: number, success: boolean | implemented |
SPELL_RANGE_CHECK_UPDATE | spellIdentifier: SpellIdentifier, isInRange: boolean, checksRange: boolean | not implemented |
SPELL_TEXT_UPDATE | spellID: number | not implemented |
UPDATE_SPELL_TARGET_ITEM_CONTEXT | no payload | not implemented |
An event the emulator doesn't fire on its own can still be fired from a test: mock.fireEvent("ENCHANT_SPELL_SELECTED").
Structures
DeadlyDebuffInfo· criticalTimeRemainingMs?, criticalStacks?, priority, warningText, soundKitID?PowerTypeChange· powerType, amountSpellInfo· name, iconID, originalIconID, castTime, minRange, maxRange, spellID
sources
Signatures, events and structures: Blizzard's API documentation (Blizzard_APIDocumentationGenerated) (Spell system, camelot 1.60.1). Descriptions: Blizzard's API documentation (Blizzard_APIDocumentationGenerated); warcraft.wiki.gg's API pages, by its contributors, CC BY-SA 4.0 ↗; written by wowlua where no documentation describes the entry.