summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorhemagx <hemagx2@gmail.com>2016-01-25 11:35:19 +0200
committerhemagx <hemagx2@gmail.com>2016-01-25 11:36:01 +0200
commitb77735473db348a65b749a79549852713f142dc1 (patch)
tree892b56949ae77e66f9d83109e4c1118485f1410d /src/map/clif.c
parent0ed2d09e9aa88af01698707fd701363bdbd92b4b (diff)
downloadhercules-b77735473db348a65b749a79549852713f142dc1.tar.gz
hercules-b77735473db348a65b749a79549852713f142dc1.tar.bz2
hercules-b77735473db348a65b749a79549852713f142dc1.tar.xz
hercules-b77735473db348a65b749a79549852713f142dc1.zip
Fix packet id being sent encrypted to Hercules Plugin Manager.
Now packet id will be passed to Hercules Plugin Manager instead of let it figure it on itself
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 3b15265f7..817579e23 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -18745,21 +18745,21 @@ int clif_parse(int fd) {
if (RFIFOREST(fd) < 2)
return 0;
+ if (sd)
+ parse_cmd_func = sd->parse_cmd_func;
+ else
+ parse_cmd_func = clif->parse_cmd;
+
+ cmd = parse_cmd_func(fd,sd);
+
if (VECTOR_LENGTH(HPM->packets[hpClif_Parse]) > 0) {
- int result = HPM->parse_packets(fd,hpClif_Parse);
+ int result = HPM->parse_packets(fd,cmd,hpClif_Parse);
if (result == 1)
continue;
if (result == 2)
return 0;
}
- if( sd )
- parse_cmd_func = sd->parse_cmd_func;
- else
- parse_cmd_func = clif->parse_cmd;
-
- cmd = parse_cmd_func(fd,sd);
-
// filter out invalid / unsupported packets
if (cmd > MAX_PACKET_DB || cmd < MIN_PACKET_DB || packet_db[cmd].len == 0) {
ShowWarning("clif_parse: Received unsupported packet (packet 0x%04x (0x%04x), %"PRIuS" bytes received), disconnecting session #%d.\n",