summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-01-07 02:47:30 +0300
committerAndrei Karas <akaras@inbox.ru>2018-01-14 18:06:02 +0300
commita3073644e5c15264a0e1ca6e9b79558215851573 (patch)
tree0e4aa2f849d7db6c4d51a4245965a9e3625f5713
parentca83900abca1887bbecadc86bce92b5c57ba6de2 (diff)
downloadhercules-a3073644e5c15264a0e1ca6e9b79558215851573.tar.gz
hercules-a3073644e5c15264a0e1ca6e9b79558215851573.tar.bz2
hercules-a3073644e5c15264a0e1ca6e9b79558215851573.tar.xz
hercules-a3073644e5c15264a0e1ca6e9b79558215851573.zip
Add new map server change packet 0x0ac7.
-rw-r--r--src/map/clif.c22
1 files 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 <map name>.16B <x>.W <y>.W <ip>.L <port>.W
+/// 0ac7 <map name>.16B <x>.W <y>.W <ip>.L <port>.W <zero>.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)