WoW:API UnitBuff: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 43: Line 43:
: Retrieve info (texture name) about a certain buff of the specified unit.
: Retrieve info (texture name) about a certain buff of the specified unit.


----
;''See Also''
;''See Also''


: [[API UnitDebuff|UnitDebuff]]
: [[API UnitDebuff|UnitDebuff]]
: [[Check Hunter Aspect|Sample Code Check Hunter Aspect]]
: [[Queriable Buff effects|List of known buff and debuff effects that can be queried]]


----
----
{{Template:WoW API}}
{{Template:WoW API}}

Revision as of 22:30, 1 January 2005

UnitBuff -Documentation by Sarf-

Retrieve info about a certain buff on a certain unit.

buffTexture = UnitBuff(unitName, buffIndex);

Arguments
(String unitName)
unitName
The name of the unit you wish to retrieve info on
Viable names known:
  • party1-4
  • pet
  • target
(Number buffIndex)
buffIndex
The index num of the buff to retrieve info on. Starts at 1 and goes up to (and possibly beyond) a certain number.
The maximum numbers used by the Blizzard code are 16 for party/pet buffs, 8 for party/pet debuffs and 5 for target buffs and debuffs.

Returns
(String buffTexture)
buffTexture
The identifier of (path and filename to) the indicated buff, or nil if no buff

Example
buff = UnitBuff("pet", i);
Result

Retrieves the buff texture of the pets buff with the index of "i".


Description
Retrieve info (texture name) about a certain buff of the specified unit.

See Also
UnitDebuff
Sample Code Check Hunter Aspect
List of known buff and debuff effects that can be queried

Template:WoW API