WoW:API GetPlayerBuffName: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(removedapi)
mNo edit summary
Line 1: Line 1:
{{removedapi|3.0|Use {{api|UnitAura}} (or derived functions) to retrieve information about buffs.}}
{{wowapi|removed=3.0|replace=Use {{api|UnitAura}} and derived functions instead.}}
{{wowapi}} __NOTOC__


<!-- Describe the purpose of the function, exhausting detail can be saved for a later section -->
Used to retrieve the name and rank of a buff in a given index, or to verify a buff with the given name (and optionally, rank) is present.
Used to retrieve the name and rank of a buff in a given index, or to verify a buff with the given name (and optionally, rank) is present.
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
name, rank = GetPlayerBuffName(id, or "name"[,"rank"])


== Arguments ==
local name, rank = GetPlayerBuffName(id, or "name"[,"rank"])
;id : Number - index from 1 to 16
;name : String - name of the buff to retrieve
;rank : String (Optional) - rank of the buff to retrieve (as returned by this function)


== Parameters ==
=== Arguments ===
* id (number) - index from 1 to 16
* name (string) - name of the buff to retrieve
* rank (string) - rank of the buff to retrieve, as returned by this function (Optional)


== Returns ==
=== Returns ===
;name : String - name of buff found
* name (string) - name of buff found
;rank : String - rank of buff found
* rank (string) - rank of buff found
 


== Example ==
== Example ==
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
Called on a paladin with Devotion Aura (Rank 1) in buff slot 1
  local buffName, buffRank = GetPlayerBuffName(1)
  local buffName, buffRank = GetPlayerBuffName(1)
(called on a paladin with Devotion Aura(Rank 1) in buff slot 1)


<big>'''Result'''</big>
;Result
<!-- If it helps, include example results here, though they are not required. You're allowed to cheat liberally since WoW isn't a command line language. -->
  buffName = "Devotion Aura"
  buffName = "Devotion Aura"
  buffRank = "Rank 1"
  buffRank = "Rank 1"
== Notes ==
* Removed in patch 3.0. Use {{api|UnitAura}} (or derived functions) to retrieve information about buffs.

Revision as of 21:48, 12 February 2021

WoW API < GetPlayerBuffName

Used to retrieve the name and rank of a buff in a given index, or to verify a buff with the given name (and optionally, rank) is present.

local name, rank = GetPlayerBuffName(id, or "name"[,"rank"])

Parameters

Arguments

  • id (number) - index from 1 to 16
  • name (string) - name of the buff to retrieve
  • rank (string) - rank of the buff to retrieve, as returned by this function (Optional)

Returns

  • name (string) - name of buff found
  • rank (string) - rank of buff found

Example

Called on a paladin with Devotion Aura (Rank 1) in buff slot 1

local buffName, buffRank = GetPlayerBuffName(1)
Result
buffName = "Devotion Aura"
buffRank = "Rank 1"

Notes

  • Removed in patch 3.0. Use UnitAura (or derived functions) to retrieve information about buffs.