WoW:API GetPlayerBuff: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
(Changed from {{WoW API}} to {{wowapi}})
Line 1: Line 1:
<center>'''GetPlayerBuff''' ''-Documentation by Sarf-''</center>
{{wowapi}}
<center>'''GetPlayerBuff''' ''-Documentation by Sarf-''</center>


Retrieve info about a certain player buff of a certain type.
Retrieve info about a certain player buff of a certain type.
Line 56: Line 57:


----
----
{{WoW API}}

Revision as of 00:32, 25 August 2006

WoW API < GetPlayerBuff

GetPlayerBuff -Documentation by Sarf-

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

buffIndex, untilCancelled = GetPlayerBuff(buffId, buffFilter);

Arguments
(Number buffId)
buffId
The id of the buff to retrieve. Starts at 0 and goes up to 15 (may get higher).
(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.

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

Example
local buffIndex, untilCancelled = GetPlayerBuff(0, "HELPFUL|HARMFUL|PASSIVE");
Result

Retrieves buff info about the first buff you have.


Description
Retrieves info and identifier about a certain effect on the player.
See Also