Returns information about a buff on a unit. This function is an alias for UnitAura() with a built-in HELPFUL filter (which cannot be removed or negated with the HARMFUL filter).
See also Unit functions, Buff functions.
Signature:
name, rank, icon, count, dispelType, duration, expires, caster, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, _, nameplateShowAll, timeMod, value1, value2, value3 = UnitBuff("unit", index [, "filter"]) or UnitBuff("unit", "name" [, "rank" [, "filter"]])
Arguments:
unit- A unit to query (string, unitID)index- Index of an aura to query (number)name- Name of an aura to query (string)rank- Secondary text of an aura to query (often a rank; e.g. "Rank 7") (string)filter- A list of filters to use separated by the pipe '|' character; e.g."RAID|PLAYER"will query group buffs cast by the player (string)CANCELABLE- Show auras that can be cancelledNOT_CANCELABLE- Show auras that cannot be cancelledPLAYER- Show auras the player has castRAID- Show auras the player can cast on party/raid members (as opposed to self buffs)
Returns:
name- Name of the aura (string)rank- Secondary text for the aura (often a rank; e.g. "Rank 7") (string)icon- Path to an icon texture for the aura (string)count- The number of times the aura has been applied (number)dispelType- Type of aura (relevant for dispelling and certain other mechanics); nil if not one of the following values: (string)CurseDiseaseMagicPoison
duration- Total duration of the aura (in seconds). Zero if the unit is phased or out of range. (number)expires- Time at which the aura will expire; can be compared to GetTime() to determine time remaining. Zero if the unit is phased or out of range. (number)caster- Unit which applied the aura. If the aura was applied by a unit that does not have a token but is controlled by one that does (e.g. a totem or another player's vehicle), returns the controlling unit. Returns nil if the casting unit (or its controller) has no unitID. (string, unitID)isStealable- true if the aura can be transferred to a player using the Spellsteal spell (boolean)nameplateShowPersonal- true if the aura should be visible above nameplates of affected targets, but only for the player that casted it (boolean)spellID- spellID of the aura (number)canApplyAura- true if the player can apply the aura (not necessarily if the player did apply the aura, just if the player can apply the aura). (boolean)isBossDebuff- true if the aura was cast by a boss. (boolean)_- unknown parameter (boolean)nameplateShowAll- true if the aura should be visible above nameplates of affected targets for all players (boolean)timeMod- the real time remaining on the aura is(expirationTime - GetTime()) / timeMod, likely used e.g. on Chronomatic Anomaly (number)value1- Value of variable effect 1 of the aura. (HoTs, resource-capturing trinkets, etc.) (number)value2- Value of variable effect 2 of the aura. (HoTs, resource-capturing trinkets, etc.) (number)value3- Value of variable effect 3 of the aura. (HoTs, resource-capturing trinkets, etc.) (number)