Explain this wizzardry

Im trying to get the Guild Icon so I thought I could get it from ‘wtfisthismagic = C_GuildInfo.GetGuildTabardInfo(“player”)’ but emblemFileID is not the icon i did some magic and looked at the look at the wizardry blizz employs in this API, its like a russian doll, I went into the functions and they have empty tables lol tables in functions functions in tables its a mess, why is it so complicated to pass this info to the client?

Table Structure: wtfisthismagic
emblemFileID = 414862
borderColor = {
b = 0.18823531270027
g = 0.80000007152557
GetRGBA = function: 00000213608EAE98
IsRGBEqualTo = function: 00000213608EADF0
SetRGB = function: 00000213608EAF40
GetRGB = function: 00000213608EAE28
OnLoad = function: 00000213608EAD80
GenerateHexColorMarkup = function: 00000213608EAFE8
WrapTextInColorCode = function: 00000213608EB020
GenerateHexColor = function: 00000213608EAF78
IsEqualTo = function: 00000213608EADB8
r = 0.9764706492424
GenerateHexColorNoAlpha = function: 00000213608EAFB0
SetRGBA = function: 00000213608EAF08
GetRGBAsBytes = function: 00000213608EAE60
GetRGBAAsBytes = function: 00000213608EAED0
},
emblemStyle = 114
backgroundColor = {
b = 1
g = 1
GetRGBA = function: 00000213608EAE98
IsRGBEqualTo = function: 00000213608EADF0
SetRGB = function: 00000213608EAF40
GetRGB = function: 00000213608EAE28
OnLoad = function: 00000213608EAD80
GenerateHexColorMarkup = function: 00000213608EAFE8
WrapTextInColorCode = function: 00000213608EB020
GenerateHexColor = function: 00000213608EAF78
IsEqualTo = function: 00000213608EADB8
r = 1
GenerateHexColorNoAlpha = function: 00000213608EAFB0
SetRGBA = function: 00000213608EAF08
GetRGBAsBytes = function: 00000213608EAE60
GetRGBAAsBytes = function: 00000213608EAED0
},
emblemColor = {
b = 0
g = 0.33725491166115
GetRGBA = function: 00000213608EAE98
IsRGBEqualTo = function: 00000213608EADF0
SetRGB = function: 00000213608EAF40
GetRGB = function: 00000213608EAE28
OnLoad = function: 00000213608EAD80
GenerateHexColorMarkup = function: 00000213608EAFE8
WrapTextInColorCode = function: 00000213608EB020
GenerateHexColor = function: 00000213608EAF78
IsEqualTo = function: 00000213608EADB8
r = 0.40392160415649
GenerateHexColorNoAlpha = function: 00000213608EAFB0
SetRGBA = function: 00000213608EAF08
GetRGBAsBytes = function: 00000213608EAE60
GetRGBAAsBytes = function: 00000213608EAED0
},

Create an image in the middle of the screen with the players tabard logo (you will have to /reload to get rid of it)

/run local tbl = C_GuildInfo.GetGuildTabardInfo("player") local f = UIParent:CreateTexture() f:SetSize(200, 200) f:SetPoint("CENTER") f:SetTexture(tbl.emblemFileID) f:SetVertexColor(tbl.emblemColor:GetRGB())

The emblemFileID is the logo file, each of the colour entries is a ColorMixin (https://warcraft.wiki.gg/wiki/ColorMixin), you can use the table.xxxColor.GetRGB() method to get the R, G, B of the actual colour.

1 Like

Winner! ok I trust you a bit now

11+ years doing this has to count for something I guess.

2 Likes

you should add this to wow wiki it needs context

https://warcraft.wiki.gg/wiki/API_C_GuildInfo.GetGuildTabardInfo
The wiki says what the elements of the returned table are and has a link to the information for each. Not sure what other context is needed.

your script that has an example of how to use the returns, maybe not context but example use for us noobs

That could probably be said for every API that returns a table which these days is many (many) of them and more are being added/converted to do so each expansion. I have no desire to spend the next 11+ years creating examples of how to use a table.

“One example, mastery you seek? Learn deeply, you must. See not just what is, but what can be.” - yoda probably

And just for clarity does the player need to have a guild tabbard equiped or just be in a guild?

cause we can add some if not emblemFileID then print(“equip a guild tabbard nerd”) return end conditions to get this information dynamically when the player equips a tabbard, and just gracefully return before nil errors make things fun

Just be in a guild.

1 Like

thanks ill credit you and link this thread in my addon youve been a big help fizzlepants

I may never help you again :wink:

Oh you will, you know why? because my questions are fun and deeper then then the how do i make a macro that turns me into a bird when im in cat form mundane threads, you actaully have to think to help me :smiley: