diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-06-21 05:39:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-06-29 19:46:09 +0300 |
commit | 272c02ba0e4b4b1c752b26e33e1aa4b80eef4600 (patch) | |
tree | 007da9b7f9629b82c4014ce7d0b1d9c8d1cbeb9d | |
parent | 3494a761fdd79ebb6077a0f641c8b0df4b87bd26 (diff) | |
download | hercules-272c02ba0e4b4b1c752b26e33e1aa4b80eef4600.tar.gz hercules-272c02ba0e4b4b1c752b26e33e1aa4b80eef4600.tar.bz2 hercules-272c02ba0e4b4b1c752b26e33e1aa4b80eef4600.tar.xz hercules-272c02ba0e4b4b1c752b26e33e1aa4b80eef4600.zip |
Add new packet for change map server with air ship.
By default missing client image.
-rw-r--r-- | src/map/clif.c | 23 | ||||
-rw-r--r-- | src/map/clif.h | 1 | ||||
-rw-r--r-- | src/map/packets.h | 6 |
3 files changed, 27 insertions, 3 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 81a1a117e..7ba070409 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -1977,6 +1977,28 @@ void clif_changemapserver(struct map_session_data* sd, unsigned short map_index, WFIFOSET(fd, packet_len(cmd)); } +/// Notifies the client of a position change (with air ship) to coordinates on given map, which is on another map-server (ZC_NPCACK_SERVERMOVE). +/// 0a4c <map name>.16B <x>.W <y>.W <ip>.L <port>.W +void clif_changemapserver_airship(struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port) +{ +#if (PACKETVER_MAIN_NUM >= 20180620) || (PACKETVER_RE_NUM >= 20180321) || (PACKETVER_ZERO_NUM >= 20171027) + // [4144] this packet is not used yet by kro, but it here + int fd; + const int cmd = 0xa4c; + nullpo_retv(sd); + fd = sd->fd; + + 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)); +#endif +} + void clif_blown(struct block_list *bl) { //Aegis packets says fixpos, but it's unsure whether slide works better or not. @@ -21414,6 +21436,7 @@ void clif_defaults(void) { clif->maptypeproperty2 = clif_maptypeproperty2; /* multi-map-server */ clif->changemapserver = clif_changemapserver; + clif->changemapserver_airship = clif_changemapserver_airship; /* npc-shop-related */ clif->npcbuysell = clif_npcbuysell; clif->buylist = clif_buylist; diff --git a/src/map/clif.h b/src/map/clif.h index 69b711dc2..e7db9a9b8 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -769,6 +769,7 @@ struct clif_interface { void (*maptypeproperty2) (struct block_list *bl,enum send_target t); /* multi-map-server */ void (*changemapserver) (struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); + void (*changemapserver_airship) (struct map_session_data* sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port); /* npc-shop-related */ void (*npcbuysell) (struct map_session_data* sd, int id); void (*buylist) (struct map_session_data *sd, struct npc_data *nd); diff --git a/src/map/packets.h b/src/map/packets.h index eb1947a05..f4832a307 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -81,7 +81,7 @@ packet(0x008e,-1); //packet(0x008f,-1); packet(0x0090,7,clif->pNpcClicked,2); packet(0x0091,22); // ZC_NPCACK_MAPMOVE -packet(0x0092,28); +packet(0x0092,28); // ZC_NPCACK_SERVERMOVE packet(0x0093,2); packet(0x0094,6,clif->pGetCharNameRequest,2); // CZ_REQNAME packet(0x0095,30); @@ -3398,7 +3398,7 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0a49,22); packet(0x0a4a,6); packet(0x0a4b,22); // ZC_AIRSHIP_MAPMOVE - packet(0x0a4c,28); + packet(0x0a4c,28); // ZC_AIRSHIP_SERVERMOVE #endif // 2016-01-27aRagexeRE @@ -3730,7 +3730,7 @@ packet(0x96e,-1,clif->ackmergeitems); packet(0x0ac4,-1); packet(0x0ac5,156,clif->pDull/*,XXX*/); packet(0x0ac6,156); - packet(0x0ac7,156); + packet(0x0ac7,156); // ZC_NPCACK_SERVERMOVE // changed packet sizes packet(0x0abe,-1); packet(0x0abf,-1); |