WoW:API UnitRace: Difference between revisions
Jump to navigation
Jump to search
UnitRace -Documentation by The_ED-
mNo edit summary |
mNo edit summary |
||
Line 15: | Line 15: | ||
:;race : The localized race of the specified unit as a string. e.g. Tauren, Orc etc. | :;race : The localized race of the specified unit as a string. e.g. Tauren, Orc etc. | ||
:;raceEn : The race in english as a string. e.g Tauren, Orc etc. | :;raceEn : The race in english as a string. e.g Tauren, Orc etc. | ||
:(Note for undead: race returns "Undead" but raceEn returns "Scourge") | |||
---- | ---- |
Revision as of 12:01, 8 December 2005
Returns the race (Tauren, Orc, etc) of the specified unit.
race, raceEn = UnitRace("unit");
- Arguments
- ("unit")
- unit
- String - The 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. e.g Tauren, Orc etc.
- (Note for undead: race returns "Undead" but raceEn returns "Scourge")
- 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)