summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-05 23:37:03 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-14 06:00:50 +0300
commit94366099f9019643c9e431a35af064283fab5a0c (patch)
tree809e747ca8bf89cf63ed4643ee348f7a40e74d6c /src/map
parent77841351959658c576d1087dfdcc6ea0886ade20 (diff)
downloadhercules-94366099f9019643c9e431a35af064283fab5a0c.tar.gz
hercules-94366099f9019643c9e431a35af064283fab5a0c.tar.bz2
hercules-94366099f9019643c9e431a35af064283fab5a0c.tar.xz
hercules-94366099f9019643c9e431a35af064283fab5a0c.zip
Add interface for packets in common.
For now supported only packet length fields.
Diffstat (limited to 'src/map')
-rw-r--r--src/map/HPMmap.c1
-rw-r--r--src/map/atcommand.c1
-rw-r--r--src/map/clif.c13
-rw-r--r--src/map/packets_struct.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index 091a53311..8ea524d23 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -38,6 +38,7 @@
#include "common/mapindex.h"
#include "common/mmo.h"
#include "common/nullpo.h"
+#include "common/packets.h"
#include "common/random.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 236975b32..d65af9dd1 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -62,6 +62,7 @@
#include "common/memmgr.h"
#include "common/mmo.h" // MAX_CARTS
#include "common/nullpo.h"
+#include "common/packets.h"
#include "common/random.h"
#include "common/showmsg.h"
#include "common/socket.h"
diff --git a/src/map/clif.c b/src/map/clif.c
index 44cefcd7e..6d21e8e0e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -65,6 +65,7 @@
#include "common/memmgr.h"
#include "common/mmo.h" // NEW_CARTS, char_achievements
#include "common/nullpo.h"
+#include "common/packets.h"
#include "common/random.h"
#include "common/showmsg.h"
#include "common/socket.h"
@@ -22200,13 +22201,13 @@ static void packetdb_loaddb(void)
memset(packet_db,0,sizeof(packet_db));
#define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF)
-#include "packets.h" /* load structure data */
+#include "map/packets.h" /* load structure data */
#ifdef PACKETVER_ZERO
-#include "packets_shuffle_zero.h"
+#include "map/packets_shuffle_zero.h"
#elif defined(PACKETVER_RE)
-#include "packets_shuffle_re.h"
+#include "map/packets_shuffle_re.h"
#else // PACKETVER_ZERO
-#include "packets_shuffle_main.h"
+#include "map/packets_shuffle_main.h"
#endif // PACKETVER_ZERO
#undef packet
#define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0)
@@ -22214,9 +22215,9 @@ static void packetdb_loaddb(void)
packetKeys(OBFUSCATIONKEY1,OBFUSCATIONKEY2,OBFUSCATIONKEY3);
#else // defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3)
#ifdef PACKETVER_ZERO
-#include "packets_keys_zero.h"
+#include "map/packets_keys_zero.h"
#else // PACKETVER_ZERO
-#include "packets_keys_main.h"
+#include "map/packets_keys_main.h"
#endif // PACKETVER_ZERO
#endif // defined(OBFUSCATIONKEY1) && defined(OBFUSCATIONKEY2) && defined(OBFUSCATIONKEY3)
#undef packetKeys
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 374769728..5d097104e 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -27,8 +27,6 @@
#include "common/mmo.h"
// Packet DB
-#define MIN_PACKET_DB 0x0064
-#define MAX_PACKET_DB 0x0F00
#define MAX_PACKET_POS 20
/**