From ccfd0549ce64e84e41069ec8e040ce9806b963f2 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 28 Mar 2016 13:11:40 +0200 Subject: Refactored the chat message packet processing functions - Split the processing of public chat messages and whisper messages in two functions, to make them more straightforward. Signed-off-by: Haru --- src/map/packets_struct.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/map/packets_struct.h') diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 25b20cddf..888d893b6 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -1215,6 +1215,19 @@ struct packet_quest_list_header { //struct packet_quest_list_info list[]; // Variable-length } __attribute__((packed)); +struct packet_chat_message { + uint16 packet_id; + int16 packet_len; + char message[]; +} __attribute__((packed)); + +struct packet_whisper_message { + uint16 packet_id; + int16 packet_len; + char name[NAME_LENGTH]; + char message[]; +} __attribute__((packed)); + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris -- cgit v1.2.3-60-g2f50