WoW:API UnitBuff: Difference between revisions

m
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, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff(unit, buffIndex[, castable])
  name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff(unit, index or name [, castable])


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===


:(unit, buffIndex, [showCastable])
:;unitId : String - The [[unitId|unit]] to query information for
 
:;index or name : Number or string - The index or name of the buff to retrieve information for. Indices start at 1 and go up indefinitely until there are no more buffs on target.
:;unit : String - The [[unitId|unit]] to query information for
 
:;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.


=== Returns ===
=== Returns ===
:;name : String - The name of the spell or effect of the buff. This is the name shown in yellow when you mouse over the icon.
:;name : String - The name of the spell or effect of the buff, or nil if no buff was found with the specified name or at the specified index. This is the name shown in yellow when you mouse over the icon.
:;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.
Anonymous user