UnitLevel

From Warcraft Wiki
Jump to navigation Jump to search

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