Page 1 of 1

Chat Channels

Posted: Mon Sep 09, 2013 9:34 pm
by Jabantiz
I needed to discover the channel used for harvest warnings and discovered how to have the client put the channel name in front of the line of text
Image
We had some of these already as defines, most were missing however. Also a lot of these can have the color changed in the client so for example the CHANNEL_COLOR_RED define is 3, which is CHANNEL_ERROR and that channel can have its color changed in the client so it may not be red for every one. I committed the defines to Dev SVN already and they can coexist with what we had, here is the list though

Code: Select all

#define CHANNEL_GAME_TEXT					1
#define CHANNEL_DEFAULT						2
#define CHANNEL_ERROR						3
#define CHANNEL_STATUS						4
#define CHANNEL_MOTD						5
#define CHANNEL_CHAT_TEXT					6
#define CHANNEL_NEARBY_CHAT					7
#define CHANNEL_SAY							8
#define CHANNEL_SHOUT						9
#define CHANNEL_EMOTE						10
#define CHANNEL_YELL						11
#define CHANNEL_NARRATIVE					12
#define CHANNEL_NONPLAYER_SAY				13
#define CHANNEL_GROUP_CHAT					14
#define CHANNEL_GROUP_SAY					15 // Use this for group chat
#define CHANNEL_RAID_SAY					16
#define CHANNEL_GUILD_CHAT					17
#define CHANNEL_GUILD_SAY					18 // Use this for guild chat
#define CHANNEL_OFFICER_SAY					19
#define CHANNEL_GUILD_MOTD					20
#define CHANNEL_GUILD_MEMBER_ONLINE			21
#define CHANNEL_GUILD_EVENT					22
#define CHANNEL_GUILD_RECRUITING_PAGE		23
#define CHANNEL_GUILD_RECRUITING_PAGE_OTHER	24
#define CHANNEL_PRIVATE_CHAT				25
#define CHANNEL_NONPLAYER_TELL				26
#define CHANNEL_OBJECT_TEXT					27
#define CHANNEL_PRIVATE_TELL				28
#define CHANNEL_TELL_FROM_CS				29
#define CHANNEL_ARENA						30
#define CHANNEL_CHAT_CHANNEL_TEXT			31
#define CHANNEL_OUT_OF_CHARACTER			32
#define CHANNEL_AUCTION						33
// 34 is nothing, message with 44 as type will not show on client
#define CHANNEL_CHARACTER_TEXT				35
#define CHANNEL_REWARD						36
#define CHANNEL_DEATH						37
#define CHANNEL_PET_CHAT					38
#define CHANNEL_SKILL						39
#define CHANNEL_FACTION						40
// Combat related chat channels start here
#define CHANNEL_SPELLS						41
#define CHANNEL_YOU_CAST					42
#define CHANNEL_YOU_FAIL					43
#define CHANNEL_CRITICAL_CAST				44
#define CHANNEL_FRIENDLY_CAST				45
#define CHANNEL_FRIENDLY_FAIL				46
#define CHANNEL_OTHER_CAST					47
#define CHANNEL_OTHER_FAIL					48
#define CHANNEL_HOSTILE_CAST				49
#define CHANNEL_HOSTILE_FAIL				50
#define CHANNEL_WORN_OFF					51
#define CHANNEL_SPELLS_OTHER				52
#define CHANNEL_HEAL_SPELLS					53
#define CHANNEL_HEALS						54
#define CHANNEL_FRIENDLY_HEALS				55
#define CHANNEL_OTHER_HEALS					56
#define CHANNEL_HOSTILE_HEALS				57
#define CHANNEL_CRITICAL_HEALS				58
#define CHANNEL_COMBAT						59
#define CHANNEL_GENERAL_COMBAT				60
#define CHANNEL_HEROIC_OPPORTUNITY			61
#define CHANNEL_NON_MELEE_DAMAGE			62
#define CHANNEL_DAMAGE_SHIELD				63
#define CHANNEL_WARD						64
#define CHANNEL_DAMAGE_INTERCEPT			65
#define CHANNEL_MELEE_COMBAT				66
#define CHANNEL_WARNINGS					67
#define CHANNEL_YOU_HIT						68
#define CHANNEL_YOU_MISS					69
#define CHANNEL_ATTACKER_HITS				70
#define CHANNEL_ATTACKER_MISSES				71
#define CHANNEL_YOUR_PET_HITS				72
#define CHANNEL_YOUR_PET_MISSES				73
#define CHANNEL_ATTACKER_HITS_PET			74
#define CHANNEL_ATTACKER_MISSES_PET			75
#define CHANNEL_OTHER_HIT					76
#define CHANNEL_OTHER_MISSES				77
#define CHANNEL_CRITICAL_HIT				78
#define CHANNEL_HATE_ADJUSTMENTS			79
#define CHANNEL_YOUR_HATE					80
#define CHANNEL_OTHERS_HATE					81
#define CHANNEL_DISPELS_AND_CURES			82
#define CHANNEL_DISPEL_YOU					83
#define CHANNEL_DISPEL_OTHER				84
#define CHANNEL_CURE_YOU					85
#define CHANNEL_CURE_OTHER					86
// End of combat chat channels
#define CHANNEL_OTHER						87
#define CHANNEL_MONEY_SPLIT					88
#define CHANNEL_LOOT						89
#define CHANNEL_LOOT_ROLLS					90
#define CHANNEL_COMMAND_TEXT				91
#define CHANNEL_BROADCAST					92  // Goes to all chat windows no matter what
#define CHANNEL_WHO							93
#define CHANNEL_COMMANDS					94
#define CHANNEL_MERCHANT					95
#define CHANNEL_MERCHANT_BUY_SELL			96
#define CHANNEL_CONSIDER_MESSAGE			97
#define CHANNEL_CON_MINUS_2					98
#define CHANNEL_CON_MINUS_1					99
#define CHANNEL_CON_0						100
#define CHANNEL_CON_1						101
#define CHANNEL_CON_2						102
#define CHANNEL_TRADESKILLS					103
#define CHANNEL_HARVESTING					104
#define CHANNEL_HARVESTING_WARNINGS			105
// 106 is nothing, message sent with this channel won't display in the client
#define CHANNEL_VOICE_CHAT					107
// 108+ will crash the client DO NOT USE
A lot of what we use are wrong too. Looking at the screen shot the guild member log in is currently sent in the guild event channel (CHANNEL_GUILD_EVENT) when it should be sent as CHANNEL_GUILD_MEMBER_ONLINE. There are also a lot that I have no clue when they are sent like guild chat (guild say is what is used to talk in guild chat), narrative, and private chat (tells are private tell) just to list a few.

There are also others which might be useful that we didn't have such as CHANNEL_BROADCAST which will go to all chat windows and can't be blocked.

John, should we start using these and eventually get rid of the other defines we have? or just use both? or just ignore these?

Re: Chat Channels

Posted: Tue Sep 10, 2013 1:47 pm
by John Adams
Jabantiz wrote:John, should we start using these and eventually get rid of the other defines we have? or just use both? or just ignore these?
You know my vote is always for "do it right", so whatever you feel we can do over time, or all at once. Scat is who implemented "Custom Channels" and Guilds and of course LE did the first few public channels. I doubt either got more attention than a quick implementation.

I believe Scat's custom channels are what get stored in the db `channels` table. Then there were all those others for level 1-9, classes, etc. Are all of those wrong?

Re: Chat Channels

Posted: Tue Sep 10, 2013 4:25 pm
by Jabantiz
Scat's custom channels, which also cover the level 1-9 and any chat you can use /# to talk in, use a different packet and I just tested after I read you post, they all work properly and the client can change the color per channel. I believe guild chat is right as well as group chat, I know /ooc is right, /auction was wrong but should be fixed with the new defines. After that I have not done much testing.

This will only effect any message sent with Client::Message() or Client::SimpleMessage(), the first param is the channel and should use a define.