v0.13.8

C_Spell

namespaceavailable in: camelot

Status in wowlua

71 functions: 22 implemented, 7 recorded, 42 guessed. 6 events, 2 of them fired by the emulator on its own.

Functions

functionwhat it doesstatus
CancelAutoRepeatSpellCancels the player's active auto repeat spell, if any
(): boolean
guessed
CancelItemTempEnchantmentCancel a temporary enchantment on an item
(weaponSlot: WeaponSlot, enchantmentType: ItemEnchantType)
guessed
CancelSpellByIDCancels the given spell. · by wowlua
(spellID: number)
guessed
DoesSpellExistReturns true if the spell exists, regardless of whether the player has learned it
(spellIdentifier: SpellIdentifier): boolean
implemented
EnableSpellRangeCheckUsed 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
GetAuraStatChangesReturns the health and power changes the given spell's aura applies. · by wowlua
(spellID: number): (number, PowerTypeChange[])
guessed
GetBaseSpellReturns 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
GetDeadlyDebuffInfoReturns information about the given spell as a deadly debuff. · by wowlua
(spellIdentifier: SpellIdentifier): DeadlyDebuffInfo?
guessed
GetItemCooldownReturns nil if the item is not found or on cooldown
(itemID: number): SpellCooldownInfo?
guessed
GetItemModifiedAppearancesAppliedReturns the IDs of the item appearances the given spell applies. · by wowlua
(spellID: number): number[]
guessed
GetLastCategoryCooldownSourceSearches for the most recent spellID and itemID that started a cooldown in this category
(spellCategory: number): (number?, number?)
guessed
GetMawPowerLinkBySpellIDReturns a chat link for the Torghast power with the given spell. · by wowlua
(spellID: SpellIdentifier): string?
guessed
GetMawPowerRarityInfoBySpellIDReturns the rarity of the Torghast power with the given spell. · by wowlua
(spellID: SpellIdentifier): (number?, string?)
recorded
GetOverrideSpellReturns the ID for the override spell.
(spellIdentifier: SpellIdentifier, spec: number, onlyKnown: boolean, ignoreOverrideSpellID: number): number
implemented
GetSchoolStringReturns the display name of the given spell school mask, such as "Fire". · by wowlua
(schoolMask: number): string
implemented
GetSpellAutoCastReturns nil if spell is not found
(spellIdentifier: SpellIdentifier): (boolean?, boolean?)
guessed
GetSpellCastCountReturns 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
GetSpellChargeDurationReturns a duration object describing the active recharge time for a spell.
(spellIdentifier: SpellIdentifier): LuaDurationObject?
guessed
GetSpellChargesReturns 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
GetSpellCooldownReturns the cooldown info of a spell.
(spellIdentifier: SpellIdentifier): SpellCooldownInfo?
implemented
GetSpellCooldownDurationReturns a duration object describing the active cooldown duration for a spell.
(spellIdentifier: SpellIdentifier, ignoreGCD: boolean): LuaDurationObject?
guessed
GetSpellDescriptionReturns nil if spell is not found
(spellIdentifier: SpellIdentifier): string?
implemented
GetSpellDescriptionForItemLocationReturns nil if spell is not found
(spellIdentifier: SpellIdentifier, itemLocation: ItemLocationMixin): string?
guessed
GetSpellDisplayCountDepending 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
GetSpellIDForSpellIdentifierReturns the spell ID for a given SpellIdentifier.
(spellIdentifier: SpellIdentifier): number?
implemented
GetSpellInfoReturns spell info.
(spellIdentifier: SpellIdentifier): SpellInfo?
implemented
GetSpellLevelLearnedReturns 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
GetSpellLinkReturns the hyperlink for a spell.
(spellIdentifier: SpellIdentifier, glyphID: number?): string?
implemented
GetSpellLossOfControlCooldownDurationReturns a duration object describing the active loss of control cooldown duration for a spell.
(spellIdentifier: SpellIdentifier): LuaDurationObject?
guessed
GetSpellLossOfControlCooldownInfoReturns nil if spell is not found
(spellIdentifier: SpellIdentifier): SpellLossOfControlInfo?
guessed
GetSpellMaxCumulativeAuraApplicationsReturns the maximum number of stacks of the given spell's aura. · by wowlua
(spellID: SpellIdentifier): number
guessed
GetSpellNameReturns nil if spell is not found
(spellIdentifier: SpellIdentifier): string?
implemented
GetSpellPowerCostReturns a table containing one or more SpellPowerCostInfos, one for each power type this spell costs
(spellIdentifier: SpellIdentifier): SpellPowerCostInfo[]?
implemented
GetSpellQueueWindowReturns the spell queue window in milliseconds, from the SpellQueueWindow setting. · by wowlua
(): number
guessed
GetSpellSkillLineAbilityRankReturns 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
GetSpellSubtextReturns nil if spell is not found
(spellIdentifier: SpellIdentifier): string?
implemented
GetSpellTextureReturns nothing if spell is not found
(spellIdentifier: SpellIdentifier): (number?, number?, number?)
implemented
GetSpellTradeSkillLinkReturns nil if spell is not associated with a trade skill
(spellIdentifier: SpellIdentifier): string?
guessed
GetTargetSpellIDReturns the ID of the spell waiting for the player to pick a target. · by wowlua
(): number
recorded
GetVisibilityInfoReturns 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
IsActiveSpellReturns true if the spell is a currently active toggled spell
(spellIdentifier: SpellIdentifier, targetUnit: string?): boolean
guessed
IsAutoAttackSpellReturns true if the spell is the player's melee Auto Attack spell
(spellIdentifier: SpellIdentifier): boolean
implemented
IsAutoRepeatSpellReturns true if the spell is an auto repeat player spell
(spellIdentifier: SpellIdentifier): boolean
guessed
IsClassTalentSpellReturns true if the spell comes from a Class Talent
(spellIdentifier: SpellIdentifier): boolean
guessed
IsConsumableSpellWhether the given spell consumes an item or reagent. · by wowlua
(spellIdentifier: SpellIdentifier): boolean
guessed
IsCurrentSpellReturns true if the spell is currently being cast or is queued to be cast
(spellIdentifier: SpellIdentifier): boolean
implemented
IsExternalDefensiveReturns true if an aura is considered an external defensive.
(spellID: number): boolean
guessed
IsPressHoldReleaseSpellReturns 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
IsPriorityAuraReturns true if an aura is considered high priority and should be ordered ahead of other auras in the UI.
(spellID: number): boolean
guessed
IsPvPTalentSpellReturns true if the spell comes from a PvP Talent
(spellIdentifier: SpellIdentifier): boolean
guessed
IsRangedAutoAttackSpellReturns true if the spell is the player's ranged Auto Attack spell (ex: Shoot, Auto Shot, etc)
(spellIdentifier: SpellIdentifier): boolean
implemented
IsSelfBuffReturns true if an aura only applies effects to the player, and no other units.
(spellID: number): boolean
guessed
IsSpellCrowdControlReturns true if the spell causes a crowd control effect when cast on a valid target.
(spellIdentifier: SpellIdentifier): boolean
guessed
IsSpellDataCachedReturns true if data for the spell has already been loaded and cached this session
(spellIdentifier: SpellIdentifier): boolean
implemented
IsSpellDisabledWhether the given spell is disabled. · by wowlua
(spellIdentifier: SpellIdentifier): boolean
guessed
IsSpellHarmfulReturns true if the spell can be cast on hostile targets
(spellIdentifier: SpellIdentifier): boolean
guessed
IsSpellHelpfulReturns true if the spell can be cast on the player or other friendly targets
(spellIdentifier: SpellIdentifier): boolean
guessed
IsSpellImportantReturns 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
IsSpellInRangeReturns 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
IsSpellPassiveWhether the given spell is passive. · by wowlua
(spellIdentifier: SpellIdentifier): boolean
recorded
IsSpellUsableReturns whether the spell is currently castable.
(spellIdentifier: SpellIdentifier): (boolean, boolean)
guessed
PickupSpellPuts the given spell on the cursor. · by wowlua
(spellIdentifier: SpellIdentifier)
implemented
PlaceTargetingSpellAtCursorPlaces the spell waiting for a target at the cursor's position. · by wowlua
()
guessed
RequestLoadSpellDataRequests spell data and fires SPELL_DATA_LOAD_RESULT.
(spellIdentifier: SpellIdentifier)
implemented
SetSpellAutoCastEnabledTurns autocast of the given spell on or off. · by wowlua
(spellIdentifier: SpellIdentifier, enabled: boolean)
guessed
SpellHasRangeReturns true if the spell has a min and/or max range greater than 0
(spellIdentifier: SpellIdentifier): boolean
guessed
TargetSpellChecksItemConditionWhether the spell waiting for a target checks a condition of the targeted item. · by wowlua
(): boolean
recorded
TargetSpellIsEnchantingWhether the spell waiting for a target is an enchantment. · by wowlua
(): boolean
recorded
TargetSpellJumpsUpgradeTrackWhether the spell waiting for a target moves an item to another upgrade track. · by wowlua
(): boolean
recorded
TargetSpellReplacesBonusTreeWhether the spell waiting for a target replaces an item's bonus tree. · by wowlua
(): boolean
recorded
ToggleSpellAutoCastToggles 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

eventpayloadfired by the emulator
ENCHANT_SPELL_COMPLETEDsuccessful: boolean, enchantedItem: ItemLocationMixin?implemented
ENCHANT_SPELL_SELECTEDno payloadnot implemented
SPELL_DATA_LOAD_RESULTspellID: number, success: booleanimplemented
SPELL_RANGE_CHECK_UPDATEspellIdentifier: SpellIdentifier, isInRange: boolean, checksRange: booleannot implemented
SPELL_TEXT_UPDATEspellID: numbernot implemented
UPDATE_SPELL_TARGET_ITEM_CONTEXTno payloadnot 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, amount
  • SpellInfo · 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.