WoW:API UnitBuff: Difference between revisions

m
Remove change at the top
mNo edit summary
m (Remove change at the top)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
Retrieve info about a certain buff on a certain unit.
Retrieve info about a certain buff on a certain unit.
name, rank, iconTexture, count, duration, timeLeft =  UnitBuff(unit, buffIndex[, castable]);
In 3.0, the returns will change:
  name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff(unit, buffIndex[, castable])
  name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff(unit, buffIndex[, castable])


Line 9: Line 6:
=== Arguments ===
=== Arguments ===


:(unit, buffIndex, showCastable)
:(unit, buffIndex, [showCastable])


:;unit : String - The [[unitId|unit]] to query information for
:;unit : String - The [[unitId|unit]] to query information for


:;buffIndex : Integer - The index of the buff to retrieve information for. Starts at 1 and goes up indefinitely until there are no more buffs on target.
:;buffIndex : Number - The index of the buff to retrieve information for. Starts at 1 and goes up indefinitely until there are no more buffs on target.


:;castable : Boolean - If present and true (1), then only player-castable buffs will be returned; buffIndex still starts at 1.
:;castable : Boolean - If present and true (1), then only player-castable buffs will be returned; buffIndex still starts at 1.
Line 21: Line 18:
:;rank : String - The rank of the spell or effect that caused the buff. Returns "" if there is no rank.
:;rank : String - The rank of the spell or effect that caused the buff. Returns "" if there is no rank.
:;iconTexture : String - The identifier of (path and filename to) the indicated buff.
:;iconTexture : String - The identifier of (path and filename to) the indicated buff.
:;count : String - The number of times the buff has been applied to the target.
:;count : Number - The number of times the buff has been applied to the target.
:;duration : Number - Full duration of a buff you cast, in seconds; nil if you did not cast this buff.
:;duration : Number - Full duration of a buff you cast, in seconds; nil if you did not cast this buff.
:;timeLeft : Number - Time left before a buff expires, in seconds; nil if you did not cast this buff.
:;buffType : String - The magic type of the buff
:;duration : Number - The full duration of the buff
:;expirationTime : Number - Time the buff will expire in seconds
:;isMine : Boolean - 1 if it is casted by you otherwise nil
:;isStealable : Boolean - 1 if it is stealable otherwise nil


== Example ==
== Example ==
Anonymous user