API:UnitLevel

__NOTOC__
UnitLevel
Gets the current level values of the primary class and secondary class from a given unit.
UnitLevel(UnitId)
== Parameters ==
=== Arguments ===
:;UnitId
::string - The UnitId to query.
== Returns ==
:;primaryClassLevel
::number - Current level of the primary class from the given unit.
:::Returns <TT>nil</TT> if the specified unit does not exist (eg. "target" given but there is no target).
:;secondaryClassLevel
::number - Current level of the secondary class from the given unit.
:::Returns <TT>nil</TT> if the specified unit does not exist.
:::Returns <TT>0</TT> if the specified unit does not have a secondary class.
== Example ==
-- Print your main level to the Say Channel.
local mainLevel, secLevel = UnitLevel("player")
SendChatMessage("My main level is "..mainLevel..".", "SAY")
== Notes ==
== Related Functions ==
* UnitManaType
* UnitSkill