WoW:API GetPlayerBuff: Difference between revisions

→‎Arguments: update buffId link (or just remove it instead?)
(Command Depricated)
(→‎Arguments: update buffId link (or just remove it instead?))
Line 1: Line 1:
{{removedapi|3.0|Use {{api|UnitAura}} (or derived functions) to retrieve information about buffs.}}
{{wowapi}}
{{wowapi}}
'''''DEPRICATED'''''
This API was removed in 3.0 [http://forums.worldofwarcraft.com/thread.html?topicId=8202271194&postId=82016032556&sid=1#7].
The following commands are now in use:
:*name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = [[API UnitAura | UnitAura]]("[[API TYPE UnitId |unit]]", [index] or ["name", "rank"][, "filter"]);
:*name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = [[API UnitBuff | UnitBuff]]("[[API TYPE UnitId |unit]]", [index] or ["name", "rank"][, "filter"]);
:*name, rank, texture, count, debuffType, duration, timeLeft, untilCanceled = [[API UnitDebuff | UnitDebuff]]("[[API TYPE UnitId |unit]]", [index] or ["name", "rank"][, "filter"]);


Retrieve info about a certain player buff of a certain type.
Retrieve info about a certain player buff of a certain type.
Line 13: 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)
 
:;[[API TYPE buffID|buffId]] : The id of the buff to retrieve. Starts at 0 and goes up to 15 (may get higher).
::'''Burning Crusade''' : Starts at 1 and goes up to 16.


:(String buffFilter)
:(String buffFilter)
Line 25: 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.
:: Theoretically, buffFilters can be any combination of HELPFUL, HARMFUL, PASSIVE, CANCELABLE, NOT_CANCELABLE according to comments in the source code.


----
==Returns==
;''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 buffIndex)
==Example==
 
:;buffIndex : The index of the buff. Mainly to use for other GetPlayerBuffXYZ functions. If below zero, indicates there is no such buff.
::'''Burning Crusade''' : If 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");
  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 CancelPlayerBuff|CancelPlayerBuff]]
:* [[API GetPlayerBuffApplications|GetPlayerBuffApplications]]
:* [[API GetPlayerBuffApplications|GetPlayerBuffApplications]]
Line 64: Line 35:
:* [[API GetPlayerBuffTimeLeft|GetPlayerBuffTimeLeft]]
:* [[API GetPlayerBuffTimeLeft|GetPlayerBuffTimeLeft]]
:* [[API GameTooltip SetPlayerBuff|GameTooltip:SetPlayerBuff]]
:* [[API GameTooltip SetPlayerBuff|GameTooltip:SetPlayerBuff]]
----