Chat Categories
Somebody once made a partial list wich Chat Category Number (from the API) related to wich Category in the chat.
I am unable to remember where I saw it. Anybody knowing this so I can work the data into the Wiki? |
Quote:
Ie Get zone channel ID Lua Code:
Get Dynamic chat id: Lua Code:
Or here's dump from 100007 Code:
CHAT_CHANNEL_EMOTE = 6 |
Quote:
I will try it with this code later, when I am at my client: Code:
local function dumpCatageoryNames() |
Quote:
Lua Code:
|
The constant names can be found in the global table under "zz OTHER CONSTS". Unfortunatley they are jsut put there right next to groups of cosntants (no seperation by constant types).
Going over every entry in the global table and only extracting those that start with "CHAT_CATEGORY_" might be an option. And I also need to make sure to get the Cateogry numbers, not the Channel Numbers (different things). |
Perhaps to make my problem better undersood. What I have right now is:
(Name in the constants table) = (ChatCategoryID) CHAT_CATEGORY_SAY = 1 CHAT_CATEGORY_YELL = 2 CHAT_CATEGORY_WHISPER_INCOMING = 3 CHAT_CATEGORY_WHISPER_OUTGOING = 4 With the names being constants I would have to change on API version change. What I need is: (ChatCategoryID) = (Name used in the constants table) 1 = CHAT_CATEGORY_SAY 2 = CHAT_CATEGORY_YELL 3 = CHAT_CATEGORY_WHISPER_INCOMING 4 = CHAT_CATEGORY_WHISPER_OUTGOING With the values being read out at each launch of the UI. With the added issue that apparently the 3 "CHAT_CATEGORY_HEADER" entries use the same numbers as one other category (I asume those are deprecated/not interesting for my cocerns). So I must now include all values that start with "CHAT_CATEGORY_" but must exclude all that start with "CHAT_CATEGORY_HEADER_". It's just like the whole Leap Year calculation all over again, just with strings. |
Quote:
Lua Code:
|
Quote:
Found the documentation for find/attern: http://lua-users.org/wiki/PatternsTutorial The ^ makes certain only the start of the string is checked (improoving performance). Have to test that code when I am home again. |
Quote:
Now you only need to worry about them changing constant names :D (like they did with ITEMTYPE_SCROLL for example) Quote:
Lua Code:
|
All times are GMT -6. The time now is 05:52 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI