Thread Tools Display Modes
Prev Previous Post   Next Post Next
07/23/14, 02:40 PM   #1
klaro00
 
klaro00's Avatar
Join Date: Apr 2014
Posts: 31
How to detect the player's race

Hi,

I'm about to write an addon which displays the player's Alliance, Race and Class in a tooltip. For each of them I display the localized name plus the respective icon/symbol.

Alliance and Class is not a problem since I get both a localized text and a numeric type value. I use the type to lookup the icon texture in a table.

My problem: I cannot find a way to get the player's race as a numeric type. All I find is function
GetUnitRace("player")
which returns the localized race. This is not really helpful because I cannot use this as an index for a table with race icon textures.

How would I manage to get the race information in a more abstract way (not only as a localized text), or is there a way to get the 64x64 race icon directly?

For illustration of the purpose of my question see attachment.

Regards,
Klaro
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20140723_222802.png
Views:	472
Size:	115.2 KB
ID:	357  
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » How to detect the player's race


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off