Returns information about the buffs/debuffs on a given unit

Signature:

name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitAura("unit", index [, "filter"]) or UnitAura("unit", "name" [, "rank" [, "filter"]])

Arguments:

  • unit - The unit token to query (string)
  • index - The index of the buff to cancel (number)
  • name - The name of the buff to query (string)
  • rank - The rank string fof the buff you would like to query (i.e. "Rank 8" (string)
  • filter - A list of filters to use separated by the pipe '|' character, for example "HELPFUL|PLAYER" will show you the buffs you have cast on a given unit (string)
    • CANCELABLE - Show buffs that can be cancelled
    • HARMFUL - Show debuffs only
    • HELPFUL - Show buffs only
    • NOT_CANCELABLE - Show buffs that cannot be cancelled
    • PLAYER - Show buffs the player has cast
    • RAID - Show buffs the player can cast

Returns:

  • name - The name of the aura (string)

  • rank - Secondary text for the aura (often a rank; e.g. "Rank 7") (string)

  • icon - The path to the aura's icon texture (string)

  • count - The number of times the aura has been applied (number)

  • debuffType - The debuff type, if applicable (string)

    • curse - Curse
    • disease - Disease
    • magic - Magic
    • poison - Poison

  • duration - The total duration of the aura, in ms. (number)

  • expirationTime - The time at which the aura will expire. This can be compared to GetTime() to determine how much time is left. (number)

  • isMine - Whether or not the aura was cast by the player (1nil)

  • isStealable - Whether or not the aura can be stolen by a spell such as 'Spellsteal' (1nil)

Although we still believe this documentation to be accurate, it is in the process of being reviewed for the second edition of World of Warcraft Programming. You can safely ignore this message, as it's intended for the authors as a convenience.