summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-11-07 23:40:50 +0300
committerAndrei Karas <akaras@inbox.ru>2018-11-15 01:40:30 +0300
commitd8d7902a16283be2d92b2c2e320051c0d98aa341 (patch)
tree578398ff6cea51d5520d381da0b44ac48ac9092a
parenta9d3bb3365d4a14f72b216db49001ccb2b42d4d0 (diff)
downloadhercules-d8d7902a16283be2d92b2c2e320051c0d98aa341.tar.gz
hercules-d8d7902a16283be2d92b2c2e320051c0d98aa341.tar.bz2
hercules-d8d7902a16283be2d92b2c2e320051c0d98aa341.tar.xz
hercules-d8d7902a16283be2d92b2c2e320051c0d98aa341.zip
Add packets from plugins into packets len table.
-rw-r--r--src/common/HPM.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 014c947b6..a579a0926 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -30,6 +30,7 @@
#include "common/memmgr.h"
#include "common/mapindex.h"
#include "common/mmo.h"
+#include "common/packets.h"
#include "common/showmsg.h"
#include "common/socket.h"
#include "common/sql.h"
@@ -186,6 +187,10 @@ static bool hplugins_addpacket(unsigned short cmd, unsigned short length, void (
packet->len = length;
packet->receive = receive;
+ if (cmd <= MAX_PACKET_DB && cmd >= MIN_PACKET_DB) {
+ packets->db[cmd] = length;
+ }
+
return true;
}