Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnitCastingInfo

Last wiki revision 2023-04-05

Returns information about the spell currently being cast by the specified unit. name, text, texture, startTimeMS, endTimeMS, isTradeSkill, castID, notInterruptible, spellId = UnitCastingInfo(unit)

  • unit: : UnitId
  • name: - The name of the spell, or nil if no spell is being cast.
  • text: - The name to be displayed.
  • texture: - The texture path associated with the spell icon.
  • startTimeMS: - Specifies when casting began in milliseconds (corresponds to GetTime*1000).
  • endTimeMS: - Specifies when casting will end in milliseconds (corresponds to GetTime*1000).
  • isTradeSkill: - Specifies if the cast is a tradeskill
  • castID: : GUID - The unique identifier for this spell cast, for example.
  • notInterruptible: - if true, indicates that this cast cannot be interrupted with abilities like Kick or Pummel. In default UI those spells have shield frame around their icons on enemy cast bars. Always returns in Classic.
  • spellId: - The spell's unique identifier. (Added in 7.2.5)
  • For channeled spells, displayName is "Channeling". So far displayName is observed to be the same as name in any other contexts.
  • This function may not return anything when the target is channeling spell post it warm-up period, you should use in that case. It takes the same arguments and returns similar values specific to channeling spells.
  • In Classic, the alternative is similar to

The following snippet prints the amount of time remaining before the player's current spell finishes casting.

Source

https://warcraft.wiki.gg/wiki/API_UnitCastingInfo · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.