Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API UnitRace
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}}Returns the race (Tauren, Orc, etc) of the specified unit. race, raceEn = UnitRace("unit"); ---- ;''Arguments'' :("unit") :;unit :: String - The [[API TYPE UnitId|UnitId]] to get information from. ---- ;''Returns'' ;race : The localized race of the specified unit as a string. e.g. Tauren, Orc etc. :;raceEn :: The race in english as a string. Possible returns are: "Human", "NightElf", "Dwarf", "Gnome", "Draenei", "Worgen", "Orc", "Troll", "Scourge", "Tauren", "BloodElf", "Goblin", "Pandaren". As of Patch 7.3.5, Allied Races return: "VoidElf", "LightforgedDraenei", "HighmountainTauren" and "Nightborne". :(Note for undead: race returns "Undead" but raceEn returns "Scourge") :See also: https://wow.gamepedia.com/RaceId ---- ;''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)
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)