WoW API: UnitBuff
Jump to navigation
Jump to search
Retrieve info about a certain buff on a certain unit.
buffTexture, buffApplications = UnitBuff(unit, buffIndex[, showCastable]);
Parameters
Arguments
- (unit, buffIndex, showCastable)
- unit
- String - The unitId to query information for
- buffIndex
- Number - The index of the buff to retrieve information for. Starts at 1 and goes up to a certain number: The maximum numbers used by the Blizzard code are 16 for party/pet and 8(?) for target buffs. Is this information up to date? --Mikk 07:14, 11 August 2006 (EDT)
- showCastable
- Boolean - If present and true (1), then only buffs will be returned which are castable by the player. Index is still starting with 1 and counting up. (Added in 1.9, works in 1.9.3)
Returns
- buffTexture
- String - The identifier of (path and filename to) the indicated buff, or nil if no buff
- buffApplications
- String - The number of times the buff has been applied to the target.
Example
buff = UnitBuff("pet", 1);
Result
- Retrieves the texture name of the first buff that your pet has