diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-19 23:31:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-03 19:11:56 +0300 |
commit | 8bc2d1a953a9573909902b2987e62b4caeb1a17a (patch) | |
tree | 4bb46878801b5a1978975a13329c16675c6fd915 | |
parent | dd4b5f82e863de43a94c0ad023d4887f3308fede (diff) | |
download | hercules-8bc2d1a953a9573909902b2987e62b4caeb1a17a.tar.gz hercules-8bc2d1a953a9573909902b2987e62b4caeb1a17a.tar.bz2 hercules-8bc2d1a953a9573909902b2987e62b4caeb1a17a.tar.xz hercules-8bc2d1a953a9573909902b2987e62b4caeb1a17a.zip |
Add packet 0xac5 for clients >= 20170329.
-rw-r--r-- | src/char/char.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/char/char.c b/src/char/char.c index f6556073e..069ccc481 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -4432,14 +4432,21 @@ void char_parse_char_connect(int fd, struct char_session_data* sd, uint32 ipl) void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd) { +#if PACKETVER < 20170329 + const int cmd = 0x71; + const int len = 28; +#else + const int cmd = 0xac5; + const int len = 156; +#endif nullpo_retv(cd); - WFIFOHEAD(fd,28); - WFIFOW(fd,0) = 0x71; - WFIFOL(fd,2) = cd->char_id; - mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), WFIFOP(fd,6)); - WFIFOL(fd,22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip); - WFIFOW(fd,26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!] - WFIFOSET(fd,28); + WFIFOHEAD(fd, len); + WFIFOW(fd, 0) = cmd; + WFIFOL(fd, 2) = cd->char_id; + mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), WFIFOP(fd, 6)); + WFIFOL(fd, 22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip); + WFIFOW(fd, 26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!] + WFIFOSET(fd, len); } void char_send_wait_char_server(int fd) |