From a3073644e5c15264a0e1ca6e9b79558215851573 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Jan 2018 02:47:30 +0300 Subject: Add new map server change packet 0x0ac7. --- src/map/clif.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 5b02c8d47..b5e71ab95 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1910,19 +1910,25 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) { /// Notifies the client of a position change to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE). /// 0092 .16B .W .W .L .W +/// 0ac7 .16B .W .W .L .W .128B void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) { int fd; +#if PACKETVER >= 20170315 + const int cmd = 0xac7; +#else + const int cmd = 0x92; +#endif nullpo_retv(sd); fd = sd->fd; - WFIFOHEAD(fd,packet_len(0x92)); - WFIFOW(fd,0) = 0x92; - mapindex->getmapname_ext(mapindex_id2name(map_index), WFIFOP(fd,2)); - WFIFOW(fd,18) = x; - WFIFOW(fd,20) = y; - WFIFOL(fd,22) = htonl(ip); - WFIFOW(fd,26) = sockt->ntows(htons(port)); // [!] LE byte order here [!] - WFIFOSET(fd,packet_len(0x92)); + WFIFOHEAD(fd, packet_len(cmd)); + WFIFOW(fd, 0) = cmd; + mapindex->getmapname_ext(mapindex_id2name(map_index), WFIFOP(fd, 2)); + WFIFOW(fd, 18) = x; + WFIFOW(fd, 20) = y; + WFIFOL(fd, 22) = htonl(ip); + WFIFOW(fd, 26) = sockt->ntows(htons(port)); // [!] LE byte order here [!] + WFIFOSET(fd, packet_len(cmd)); } void clif_blown(struct block_list *bl) -- cgit v1.2.3-60-g2f50