Returns a unit's class. The second return (
classFileName) can be used for locale-independent verification of a unit's class, or to look up class-related data in various global tables:
RAID_CLASS_COLORSprovides a standard color for each class (as seen in the default who, guild, calendar, and raid UIs)
CLASS_ICON_TCOORDSprovides coordinates to locate each class' icon within the "Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes" texture
UnitClass, this function returns the same values for NPCs as for players.
See also Unit functions.
unit- A unit to query (
name- Name of a unit to query; only valid for
pet, and party/raid members (
class- The localized name of the unit's class (
classFileName- A non-localized token representing the class (