WoW:API UnitRace

Revision as of 16:45, 29 May 2005 by WoWWiki>The ED
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
UnitRace -Documentation by The_ED-

Returns the race (Tauren, Orc, etc) of the specified unit.

race = UnitRace("unit");

Arguments
("unit")
unit
String - The UnitId to get information from.

Returns


race
The race of the specified unit as a string. e.g. Tauren, Orc, Guerrier, etc.



Example
local race = UnitRace("player");
ChatFrame1:AddMessage('Your player is a : ' .. race .. );
Result
Prints the player's race to the chat frame as

'Your player is a : Tauren'.  (Or whichever race the specified unit is)