WoW:API GetPVPRankInfo: Difference between revisions
Jump to navigation
Jump to search
(upgraded deprecated template) |
m (Move page script moved page API GetPVPRankInfo to API GetPVPRankInfo without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} __NOTOC__ | ||
Get information about a specific rank. | Get information about a specific rank. | ||
rankName, rankNumber = GetPVPRankInfo(rank [, unit]); | |||
== Arguments == | |||
:(rank [, unit]) | :(rank [, unit]) | ||
Line 13: | Line 12: | ||
:;unit : String - The [[API TYPE UnitId|UnitId]] to query (e.g. "player", "party2", "pet", "target", "mouseover" etc.). This argument is needed to return the correct rank for enemy units (otherwise it would return ranks of player's faction only). | :;unit : String - The [[API TYPE UnitId|UnitId]] to query (e.g. "player", "party2", "pet", "target", "mouseover" etc.). This argument is needed to return the correct rank for enemy units (otherwise it would return ranks of player's faction only). | ||
== Returns == | |||
:rankName, rankNumber | |||
:; rankName : String - The rank's name | |||
:; rankNumber : Number - The rank's number | |||
== Examples == | |||
if (UnitPVPRank("mouseover") >= 1) then | if (UnitPVPRank("mouseover") >= 1) then | ||
rankName = GetPVPRankInfo(UnitPVPRank("mouseover"), "mouseover"); | rankName = GetPVPRankInfo(UnitPVPRank("mouseover"), "mouseover"); | ||
-- rankName now contains the localized rank for mousover unit (e.g. grunt or similar). | -- rankName now contains the localized rank for mousover unit (e.g. grunt or similar). | ||
end | end |
Latest revision as of 04:46, 15 August 2023
Get information about a specific rank.
rankName, rankNumber = GetPVPRankInfo(rank [, unit]);
Arguments[edit]
- (rank [, unit])
- rank
- Number - Specifies the number of the rank (as returned by UnitPVPRank("unit"))
- unit
- String - The UnitId to query (e.g. "player", "party2", "pet", "target", "mouseover" etc.). This argument is needed to return the correct rank for enemy units (otherwise it would return ranks of player's faction only).
Returns[edit]
- rankName, rankNumber
- rankName
- String - The rank's name
- rankNumber
- Number - The rank's number
Examples[edit]
if (UnitPVPRank("mouseover") >= 1) then rankName = GetPVPRankInfo(UnitPVPRank("mouseover"), "mouseover"); -- rankName now contains the localized rank for mousover unit (e.g. grunt or similar). end