Wikia

WoWWiki

Changes: API GetPlayerBuff

Edit

Back to page

(formatting, removedapi)
(Arguments: update buffId link (or just remove it instead?))
 
Line 7: Line 7:
   
 
==Arguments==
 
==Arguments==
;[[API TYPE buffID|buffId]] : number: The id of the buff to retrieve. Starts at 1 and goes up to 16.
+
;[[buffId]] : number: The id of the buff to retrieve. Starts at 1 and goes up to 16.
   
 
:(String buffFilter)
 
:(String buffFilter)

Latest revision as of 12:57, May 28, 2009

WoW API < GetPlayerBuff

Retrieve info about a certain player buff of a certain type.

buffIndex, untilCancelled = GetPlayerBuff(buffId, buffFilter);

ArgumentsEdit

buffId 
number: The id of the buff to retrieve. Starts at 1 and goes up to 16.
(String buffFilter)
buffFilter 
The "filter" to use when selecting buffs. Will affect what types of buffs are retrieved.
Verified buffFilters:
"HELPFUL|HARMFUL|PASSIVE"
"HELPFUL"
"HARMFUL"
Theoretically, buffFilters can be any combination of HELPFUL, HARMFUL, PASSIVE, CANCELABLE, NOT_CANCELABLE according to comments in the source code.

ReturnsEdit

buffIndex 
The index of the buff. Mainly to use for other GetPlayerBuffXYZ functions. If zero, there is no such buff.
untilCancelled 
If 1, this buff will last until it is cancelled (Aura, Aspect, Stealth).

ExampleEdit

local buffIndex, untilCancelled = GetPlayerBuff(0, "HELPFUL|HARMFUL|PASSIVE");
Result 
Retrieves buff info about the first buff you have.

See AlsoEdit

Around Wikia's network

Random Wiki