summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-12-13 08:23:29 +0300
committerAndrei Karas <akaras@inbox.ru>2019-12-13 08:36:08 +0300
commit3acb36c33e06a8a7e226e43ff8656c8cffa2eeb3 (patch)
treebb255692e83f0c733692dc8932fdba307c1a2474 /src/common
parent1f78dc3468f1a4afe1f8bd09ea340a715af1d206 (diff)
downloadhercules-3acb36c33e06a8a7e226e43ff8656c8cffa2eeb3.tar.gz
hercules-3acb36c33e06a8a7e226e43ff8656c8cffa2eeb3.tar.bz2
hercules-3acb36c33e06a8a7e226e43ff8656c8cffa2eeb3.tar.xz
hercules-3acb36c33e06a8a7e226e43ff8656c8cffa2eeb3.zip
Convert packet CZ_SE_CASHSHOP_OPEN to structure and add new packet version
Diffstat (limited to 'src/common')
-rw-r--r--src/common/packetsstatic_len.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/packetsstatic_len.h b/src/common/packetsstatic_len.h
index 730516c27..f721ab882 100644
--- a/src/common/packetsstatic_len.h
+++ b/src/common/packetsstatic_len.h
@@ -32,6 +32,10 @@
#define DEFINE_PACKET_ID(name, id) \
enum { HEADER_##name = id };
+#define CHECK_PACKET_HEADER(name, id) \
+ STATIC_ASSERT((int32)(PACKET_LEN_##id) == -1 || sizeof(struct PACKET_##name) == \
+ (size_t)PACKET_LEN_##id, "Wrong size PACKET_"#name); \
+
#define packetLen(id, len) PACKET_LEN_##id = (len),
enum packet_lengths {
#include "common/packets_len.h"