Thread Tools Display Modes
07-28-15, 11:58 AM   #1
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
Guild members Gender/Race

Is there a way to get the gender and/or the race of my guild members?

The best I could find is UnitSex() and UnitRace().
__________________
Better to fail then never have tried at all.
  Reply With Quote
07-28-15, 01:44 PM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
Gender I don't think, but race should be available from one of the guild roster functions.
__________________
Grab your sword and fight the Horde!
  Reply With Quote
07-28-15, 02:28 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
What I do with ChatLinkIcons is grab their GUID from chat events and send it through GetPlayerInfoByGUID(). As for a more direct way, I don't think there is one.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-29-15, 12:46 AM   #4
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
Thank you both.

Will dig into the guild roster functions and ChatLinkIcons.

Will post my progress
__________________
Better to fail then never have tried at all.
  Reply With Quote
07-29-15, 11:06 AM   #5
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
No luck today getting my guild members race through the guild roster functions.
But there is a lot of functions to search through so that doesn't mean it isn't there.

Digged into the coding of ChatLinkIcons and I sort of understand what is happening there.
Although it is way more advanced code that I could manage myself.
But its main problem (for me) is that it can only be used to get information from guild members that are online at that moment.
Guess that most of the "social" functions depend on players being online on one moment or another.
And I have lots of guild members that are rarely online (or have been offline for months/years).

So for now I will do without guild members gender/race.

Will now start coding for my first "frame/button factory".
Another challenge.
__________________
Better to fail then never have tried at all.

Last edited by Yukyuk : 07-29-15 at 01:23 PM.
  Reply With Quote
07-29-15, 01:04 PM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
There's only one function that directly retrieves info on any specific member in the roster. That would be GetGuildRosterInfo(). Unfortunately, it doesn't provide the race/gender data you wanted. There are no UnitIDs associated to guild members, so none of the Unit* functions would work.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-29-15, 05:19 PM   #7
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Delay the query until they're online.
http://wow.gamepedia.com/API_SendWho
http://wow.gamepedia.com/API_GetWhoInfo

And when you're in a big guild you'll probably use
http://www.wowace.com/addons/wholib/
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
07-30-15, 01:03 PM   #8
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
Guild members Gender/Race

@Rilgamon

I know the functions SendWho and GetWhoInfo.
In fact ChatLinkIcons uses kinda the same functions (the message system).

And I would like to have the gender/race of all my guild members, not only those i happen to "see" online.

Guess its up to Blizz to get us a few more guild functions to get me the data I want.
__________________
Better to fail then never have tried at all.
  Reply With Quote
07-30-15, 11:18 PM   #9
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
Originally Posted by Yukyuk View Post
I know the functions SendWho and GetWhoInfo.
In fact ChatLinkIcons uses kinda the same functions (the message system).
This explanation is extremely vague, almost to the point of being misleading.

The core principal of ChatLinkIcons is based on the fact when the game client receives a GUID from the server, it automatically resolves it and caches data about the unit it belongs to in the background. This means the instant an addon sees a GUID, it can instantly grab data from the game client's cache using GetPlayerInfoByGUID().

SendWho() works in a completely different way and doesn't really use the chat system in its core function. By default, it does trigger the result to come out as system messages, but you can tell the function to only send it to its own event, essentially hiding these server messages. In the background, a search request is sent to the server and the addon has to wait until the server responds with the results.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)
  Reply With Quote
07-31-15, 12:25 AM   #10
Yukyuk
A Chromatic Dragonspawn
 
Yukyuk's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2015
Posts: 179
@SDPhantom

I stand corrected.

Wasn't trying to be misleading.
Thank you for explaing this to me.

I now will go back to my study of (wow) lua before making another comment
__________________
Better to fail then never have tried at all.

Last edited by Yukyuk : 07-31-15 at 12:30 AM.
  Reply With Quote
07-31-15, 03:01 AM   #11
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Dont stop commenting We all learn by mistakes ... our own and those of others.
Thats how this forum works. We discuss faults or things we consider done the wrong way.
I'm here since years and I still consider myself (and my scriptingstyle) a beginner
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote
07-31-15, 08:19 PM   #12
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,322
Originally Posted by Yukyuk View Post
I now will go back to my study of (wow) lua before making another comment
Don't let this stop you from participating. There are many intricacies of the game client that are largely undocumented and collaborating with others is a good way to learn the most effective ways of performing certain tasks. We're a community proud to help and guide others in the right direction.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-31-15 at 08:21 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Guild members Gender/Race

Thread Tools
Display Modes

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