WoW:API UnitDebuff: Difference between revisions

m
Fixed "isMine" into "unitCaster", added in 3.1. This change was actually in UnitAura. Changed here also because it is just an alias for UnitAura.
(remove faq link)
m (Fixed "isMine" into "unitCaster", added in 3.1. This change was actually in UnitAura. Changed here also because it is just an alias for UnitAura.)
Line 3: Line 3:
Retrieve info about a certain debuff on a certain unit. This is essentially an alias of [[API_UnitAura|UnitAura]] with the "HARMFUL" filter applied.
Retrieve info about a certain debuff on a certain unit. This is essentially an alias of [[API_UnitAura|UnitAura]] with the "HARMFUL" filter applied.


  name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable  =  UnitDebuff(unitID, index or name [, removable]);
  name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable  =  UnitDebuff(unitID, index or name [, removable]);


== 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 at which the debuff expires (GetTime() as a reference frame).
:; expirationTime : Number - Time at which the debuff expires (GetTime() as a reference frame).
:; isMine : 1 or nil - 1 if this debuff was applied by the player.
:; unitCaster : String - [[unitId]] reference to the unit that casted the buff/debuff.
:; isStealable : 1 or nil - ?
:; isStealable : 1 or nil - ?


Line 40: Line 40:
* Patch 2.1 introduced duration and timeLeft return values.
* Patch 2.1 introduced duration and timeLeft return values.
* Patch 3.0 changes this into an alias of UnitAura; durations are now available for all debuffs.
* Patch 3.0 changes this into an alias of UnitAura; durations are now available for all debuffs.
* 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 ==
Anonymous user