![]() |
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns the specified unit's PvP rank ID.
rankID = UnitPVPRank(unit)
Arguments
- unit
- string
Returns
- rankID
- number - Starts at 5 (not at 1) for the first rank. Returns 0 if the unit has no rank. Can be used in GetPVPRankInfo() for rank information.
Example
local rankID = UnitPVPRank("target")
local rankName, rankNumber = GetPVPRankInfo(rankID)
if rankName then
print(format("%s is rank ID %d, rank number %d (%s)", UnitName("target"), rankID, rankNumber, rankName))
end
> Koribli is rank ID 12, rank number 8 (Knight-Captain)
Values
Dishonorable ranks like "Pariah" exist but were never used in Vanilla.
| Rank ID | Alliance | Horde | Rank Number |
|---|---|---|---|
| 0 | |||
| 1 | Pariah | Pariah | |
| 2 | Outlaw | Outlaw | |
| 3 | Exiled | Exiled | |
| 4 | Dishonored | Dishonored | |
| 5 | Private | Scout | |
| 6 | Corporal | Grunt | |
| 7 | Sergeant | Sergeant | |
| 8 | Master Sergeant | Senior Sergeant | |
| 9 | Sergeant Major | First Sergeant | |
| 10 | Knight | Stone Guard | |
| 11 | Knight-Lieutenant | Blood Guard | |
| 12 | Knight-Captain | Legionnaire | |
| 13 | Knight-Champion | Centurion | |
| 14 | Lieutenant Commander | Champion | |
| 15 | Commander | Lieutenant General | |
| 16 | Marshal | General | |
| 17 | Field Marshal | Warlord | |
| 18 | Grand Marshal | High Warlord |
Patch changes
Patch 5.4.0 (2013-09-10): Removed.
Patch 1.4.0 (2005-04-19): Added.
