From d8d7902a16283be2d92b2c2e320051c0d98aa341 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 7 Nov 2018 23:40:50 +0300 Subject: Add packets from plugins into packets len table. --- src/common/HPM.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/HPM.c') 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; } -- cgit v1.2.3-70-g09d2