diff options
author | Haru <haru@dotalux.com> | 2018-11-15 04:01:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 04:01:03 +0100 |
commit | 47d6523817646f2d4f081b93ec44a971a01fce25 (patch) | |
tree | 39f5f62367fed1efe1dd734a2f3a588f2e44a9f4 /src/common/HPM.c | |
parent | 3b93418544f84f142ea2a6e2bcdf1621267ff989 (diff) | |
parent | 1f237031a63567d8c96bca4a28ab9557ebe1459e (diff) | |
download | hercules-47d6523817646f2d4f081b93ec44a971a01fce25.tar.gz hercules-47d6523817646f2d4f081b93ec44a971a01fce25.tar.bz2 hercules-47d6523817646f2d4f081b93ec44a971a01fce25.tar.xz hercules-47d6523817646f2d4f081b93ec44a971a01fce25.zip |
Merge pull request #2321 from 4144/packetlen
Add complete packet len table
Diffstat (limited to 'src/common/HPM.c')
-rw-r--r-- | src/common/HPM.c | 5 |
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; } |