WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Retrieving chat message color code (https://www.wowinterface.com/forums/showthread.php?t=59510)

Platine 02-16-23 11:49 AM

Retrieving chat message color code
 
I would like to download from the system the color code of messages in the chat window, e.g. the color of WHISPER or YELL messages. I think in the function GetCVar() it can do it, just I don't know the right parameter. Can anyone help?

Dridzt 02-16-23 06:18 PM

Quote:

Originally Posted by Platine (Post 342162)
I would like to download from the system the color code of messages in the chat window, e.g. the color of WHISPER or YELL messages. I think in the function GetCVar() it can do it, just I don't know the right parameter. Can anyone help?

ChatTypeInfo.WHISPER.r[g|b]

Platine 02-19-23 03:59 AM

Yes, it is helpful. Thank you.

How about determining the color of the player's link?


Dridzt 02-19-23 11:51 AM

Code:

colorChatNamesByClass
is the CVar controlling class colors on player names.

The actual color information you can get for any player unit where you can get to their baseClass
through
Code:

_, baseClass = GetPlayerInfoByGUID(guid)
or
Code:

_, baseClass = UnitClass(unit)
then
Code:

local classColorTable = RAID_CLASS_COLORS[baseClass]
So when you have a valid UnitId or GUID you can get their class information and from that the color information.

Platine 02-20-23 12:54 PM

Thank you, Dridzt. It's work.


All times are GMT -6. The time now is 01:10 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI