API UnitLevel

Returns the level of the unit.
 level = UnitLevel(unit)
==Arguments==
:;unit: : UnitId - For example "player" or "target"
==Returns==
:;level: - The unit level. Returns -1 for boss units or hostile units 10 levels above the player (Level ??).
==Details==
* When calling UnitLevel("player") on 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.