WoW:API GetPVPRankInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
(upgraded deprecated template)
Line 1: Line 1:
{{wowapi}}
'''GetPVPRankInfo(rank [, unit])'''
'''GetPVPRankInfo(rank [, unit])'''


Line 23: Line 24:
     -- 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
----
{{Template:WoW API}}

Revision as of 18:10, 6 January 2007

WoW API < GetPVPRankInfo

GetPVPRankInfo(rank [, unit])

Get information about a specific rank.

rankName, rankNumber = GetPVPRankInfo(rank [, unit]);

Arguments
(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
rankName, rankNumber

Example
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