API UnitEffectiveLevel

Returns the unit's effective (scaled) level.

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

Sample usage:

/run print("Level "..UnitLevel("target"));

If the current target is a Level 50 mob, this macro will print  in your chat window. If the unit's level is unknown, i.e. a Level ?? target, or is a special boss,  will return -1.