API:UnitClass

Get the classes of a unit.
main, second = UnitClass("player")
== Parameter ==
:;unit
::String - the UnitId (e.g. "target", "party1", "raid1", etc..) 
== Returns ==
:;main
::String - current main class of the specified unit. Returns nil if the specified unit does not exist (eg. "target" given but there is no target).
:;second
::String - current secondary class of the specified unit. Returns nil if the specified unit does not exist; Returns the empty string if specified unit has no second class.
== Example ==
Store your classes to a table.
g_myclasses = {UnitClass("player")}
-- is the same as
-- g_myclasses ={}
-- g_myclasses[1]=<PRIMARY_CLASS>
-- g_myclasses[2]=<SECONDARY_CLASS>
UnitClass