diff options
author | Haru <haru@dotalux.com> | 2016-03-28 13:11:40 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-04-23 09:52:30 +0200 |
commit | ccfd0549ce64e84e41069ec8e040ce9806b963f2 (patch) | |
tree | 73fbb4a27b02e1807cd71678ace972921b5dca81 /src/map/packets_struct.h | |
parent | 235a8d18f8cbbb5aaf7563566ff68f15fc1054c1 (diff) | |
download | hercules-ccfd0549ce64e84e41069ec8e040ce9806b963f2.tar.gz hercules-ccfd0549ce64e84e41069ec8e040ce9806b963f2.tar.bz2 hercules-ccfd0549ce64e84e41069ec8e040ce9806b963f2.tar.xz hercules-ccfd0549ce64e84e41069ec8e040ce9806b963f2.zip |
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 <haru@dotalux.com>
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r-- | src/map/packets_struct.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 |