FANDOM


Get the class tokens of a unit.

mainClass, subClass = UnitClassToken( unit )

Parameter Edit

unit
String - the UnitID (e.g. "target", "party1", "raid1", etc..)

Returns Edit

mainClass
String - current main class token of the specified unit. Returns nil if the specified unit does not exist (eg. "target" given but there is no target).
subClass
String - current secondary class token of the specified unit. Returns nil if the specified unit does not exist; Returns nil if specified unit has no second class.

Example Edit

Print your current main class token

mainClass, subClass = UnitClassToken( "player" )
DEFAULT_CHAT_FRAME:AddMessage("My Class Token is : " .. mainClass );

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.