3.1 update; changed isMine to unitCaster.
mNo edit summary |
(3.1 update; changed isMine to unitCaster.) |
||
| Line 3: | Line 3: | ||
This function was introduced in Patch 3.0. It will serve as an all-in-one solution for querying unit buffs and debuffs. [[API UnitBuff|UnitBuff]] and [[API UnitDebuff|UnitDebuff]] will serve as aliases with built-in harmful/helpful filters. | This function was introduced in Patch 3.0. It will serve as an all-in-one solution for querying unit buffs and debuffs. [[API UnitBuff|UnitBuff]] and [[API UnitDebuff|UnitDebuff]] will serve as aliases with built-in harmful/helpful filters. | ||
Usage: | Usage: | ||
name, rank, icon, count, debuffType, duration, expirationTime, | name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura("unit", index or ["name", "rank"][, "filter"]) | ||
== Parameters == | == Parameters == | ||
| Line 19: | Line 19: | ||
:; duration : Number - The full duration of the debuff in seconds; nil if the debuff was not cast by the player. | :; duration : Number - The full duration of the debuff in seconds; nil if the debuff was not cast by the player. | ||
:; expirationTime : Number - Time in seconds when the aura will expire. | :; expirationTime : Number - Time in seconds when the aura will expire. | ||
:; | :; unitCaster : String - [[unitId]] reference to the unit that casted the buff/debuff. | ||
:; isStealable : Boolean - 1 or nil if the aura | :; isStealable : Boolean - 1 or nil depending on if the aura can be spellstolen. | ||
| Line 30: | Line 30: | ||
== History == | == History == | ||
* Patch 3.0 combined UnitDebuff and UnitBuff into this command. | * Patch 3.0 combined UnitDebuff and UnitBuff into this command. | ||
* Patch 3.1 changed "isMine" to "unitCaster". It is now possible for addons to retrieve the unitId that casted the buff/debuff. | |||
== See Also == | == See Also == | ||