WoW:API UnitClass
Jump to navigation
Jump to search
Returns the class (Mage, Warrior, etc) of the specified unit.
- Arguments
- (String unit)
- arg1
- The unit to query (e.g. "player")
- Returns
- class
- class
- The class of the specified unit as a string. e.g. Mage, Warrior, etc.
- Example
local playerClass = UnitClass("player"); ChatFrame1:AddMessage('Your player is a : ' .. playerClass);
- Result
Prints the player's class to the chat frame as 'Your player is a : Warrior'. (Or whichever class the specified unit is)
- Description
- Returns the class (Mage, Warrior, etc) of the specified unit.