WoW:API GetPlayerBuff: Difference between revisions

m
Move page script moved page API GetPlayerBuff to WoW:API GetPlayerBuff without leaving a redirect
No edit summary
m (Move page script moved page API GetPlayerBuff to WoW:API GetPlayerBuff without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''GetPlayerBuff''' ''-Documentation by Sarf-''</center>
{{removedapi|3.0|Use {{api|UnitAura}} (or derived functions) to retrieve information about buffs.}}
{{wowapi}}


Retrieve info about a certain player buff of a certain type.
Retrieve info about a certain player buff of a certain type.
Line 5: Line 6:
  buffIndex, untilCancelled = GetPlayerBuff(buffId, buffFilter);
  buffIndex, untilCancelled = GetPlayerBuff(buffId, buffFilter);


----
==Arguments==
;''Arguments''
;[[buffId]] : number: The id of the buff to retrieve. Starts at 1 and goes up to 16.
 
:(Number buffId)
 
:;buffId : The id of the buff to retrieve. Starts at 0 and goes up to 15 (may get higher).


:(String buffFilter)
:(String buffFilter)
Line 16: Line 13:
:;buffFilter : The "filter" to use when selecting buffs. Will affect what types of buffs are retrieved.
:;buffFilter : The "filter" to use when selecting buffs. Will affect what types of buffs are retrieved.


: Verified buffFilters:
:: Verified buffFilters:
:; "HELPFUL|HARMFUL|PASSIVE"
::: "HELPFUL|HARMFUL|PASSIVE"
:; "HELPFUL"
::: "HELPFUL"
:; "HARMFUL"
::: "HARMFUL"
 
: Theoretically, buffFilters can be any combination of HELPFUL, HARMFUL, PASSIVE, CANCELABLE, NOT_CANCELABLE according to comments in the source code.
 
----
;''Returns''


:(Number buffIndex)
:: Theoretically, buffFilters can be any combination of HELPFUL, HARMFUL, PASSIVE, CANCELABLE, NOT_CANCELABLE according to comments in the source code.


:;buffIndex : The index of the buff. Mainly to use for other GetPlayerBuffXYZ functions. If below zero, indicates there is no such buff.
==Returns==
;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).


:(Number untilCancelled)
==Example==
 
:;untilCancelled : If 1, this buff will last until it is cancelled (Aura, Aspect, Stealth).
 
----
;''Example''
  local buffIndex, untilCancelled = GetPlayerBuff(0, "HELPFUL|HARMFUL|PASSIVE");
  local buffIndex, untilCancelled = GetPlayerBuff(0, "HELPFUL|HARMFUL|PASSIVE");


;''Result''
;Result : Retrieves buff info about the first buff you have.
 
Retrieves buff info about the first buff you have.
 
----
;''Description''
 
: Retrieves info and identifier about a certain effect on the player.
 
;''See Also''


==See Also==
:* [[API CancelPlayerBuff|CancelPlayerBuff]]
:* [[API GetPlayerBuffApplications|GetPlayerBuffApplications]]
:* [[API GetPlayerBuffTexture|GetPlayerBuffTexture]]
:* [[API GetPlayerBuffTexture|GetPlayerBuffTexture]]
:* [[API GetPlayerBuffTimeLeft|GetPlayerBuffTimeLeft]]
:* [[API GetPlayerBuffTimeLeft|GetPlayerBuffTimeLeft]]
 
:* [[API GameTooltip SetPlayerBuff|GameTooltip:SetPlayerBuff]]
----
{{WoW API}}
Anonymous user