Wowpedia
Advertisement
Game Flavors
Links
Info
Added in 1.0.0 / 1.13.2
Popularity #26 (1624)

Returns the level of the unit.

level = UnitLevel(unit)

Arguments

unit
string : UnitId - For example "player" or "target"

Returns

level
number - The unit level. Returns -1 for boss units or hostile units 10 levels above the player (Level ??).

Details

  • When calling UnitLevel("player") on PLAYER_LEVEL_UP it might be incorrect, check the payload instead to be sure.
  • When inebriated, the apparent level of hostile units is lowered by up to 5.
Related API UnitEffectiveLevel
Related Events PLAYER_LEVEL_UP
PLAYER_LEVEL_CHANGED
Advertisement