API UnitLevel

Returns the unit's level. level = UnitLevel("unit")

Arguments

 * unit : String - The unitId to get information from. (e.g. "player", "target")

Returns

 * level : Number - The unit level. Returns -1 for bosses, or players more than 10 levels above the player

Details

 * Note that the value returned by  will most likely be incorrect when called in a  event handler, or shortly after leveling in general. Check the  payload for the correct level.
 * If the unit's level is unknown, i.e. a Level ?? target, or is a special boss,  will return -1.