diff options
author | Haru <haru@dotalux.com> | 2017-06-03 18:27:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-03 18:27:54 +0200 |
commit | 968a0b5cf3d016bf929e27f02f0dd124ac7c5a3d (patch) | |
tree | 4bb46878801b5a1978975a13329c16675c6fd915 /src/char/char.c | |
parent | bab23871da1b01c9d5276fb761bb869b99343f62 (diff) | |
parent | 8bc2d1a953a9573909902b2987e62b4caeb1a17a (diff) | |
download | hercules-968a0b5cf3d016bf929e27f02f0dd124ac7c5a3d.tar.gz hercules-968a0b5cf3d016bf929e27f02f0dd124ac7c5a3d.tar.bz2 hercules-968a0b5cf3d016bf929e27f02f0dd124ac7c5a3d.tar.xz hercules-968a0b5cf3d016bf929e27f02f0dd124ac7c5a3d.zip |
Merge pull request #1742 from 4144/packetsupdate
Add support for most released 2017 RE clients
Diffstat (limited to 'src/char/char.c')
-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) |