Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
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 |