UnitPVPRank

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Patch
Added in 1.4.0 / 1.13.2
Removed in 5.4.0

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
0
1 Pariah Pariah
-4
2 Outlaw Outlaw
-3
3 Exiled Exiled
-2
4 Dishonored Dishonored
-1
5 Private Scout
1
6 Corporal Grunt
2
7 Sergeant Sergeant
3
8 Master Sergeant Senior Sergeant
4
9 Sergeant Major First Sergeant
5
10 Knight Stone Guard
6
11 Knight-Lieutenant Blood Guard
7
12 Knight-Captain Legionnaire
8
13 Knight-Champion Centurion
9
14 Lieutenant Commander Champion
10
15 Commander Lieutenant General
11
16 Marshal General
12
17 Field Marshal Warlord
13
18 Grand Marshal High Warlord
14

Patch changes