summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-06-21 01:48:48 +0300
committerAndrei Karas <akaras@inbox.ru>2018-06-29 19:46:09 +0300
commit3494a761fdd79ebb6077a0f641c8b0df4b87bd26 (patch)
tree1cc0ed49a3beb0df24746d2a23b768e492b4994e /src/map/clif.c
parent1ca7af31cde44a22e002b0909d2689be9d9c4f8e (diff)
downloadhercules-3494a761fdd79ebb6077a0f641c8b0df4b87bd26.tar.gz
hercules-3494a761fdd79ebb6077a0f641c8b0df4b87bd26.tar.bz2
hercules-3494a761fdd79ebb6077a0f641c8b0df4b87bd26.tar.xz
hercules-3494a761fdd79ebb6077a0f641c8b0df4b87bd26.zip
Add new packet for change map with airship (warp).
By default missing client image.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 23eb3ee52..81a1a117e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1935,6 +1935,25 @@ void clif_changemap(struct map_session_data *sd, short m, int x, int y) {
WFIFOSET(fd,packet_len(0x91));
}
+/// Notifies the client of a position change (on air ship) to coordinates on given map (ZC_AIRSHIP_MAPMOVE).
+/// 0A4B <map name>.16B <x>.W <y>.W
+void clif_changemap_airship(struct map_session_data *sd, short m, int x, int y)
+{
+#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;
+ nullpo_retv(sd);
+ fd = sd->fd;
+
+ WFIFOHEAD(fd, packet_len(0xa4b));
+ WFIFOW(fd, 0) = 0xa4b;
+ mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name, WFIFOP(fd,2));
+ WFIFOW(fd, 18) = x;
+ WFIFOW(fd, 20) = y;
+ WFIFOSET(fd, packet_len(0xa4b));
+#endif
+}
+
/// 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
@@ -21385,6 +21404,7 @@ void clif_defaults(void) {
clif->spawn = clif_spawn;
/* map-related */
clif->changemap = clif_changemap;
+ clif->changemap_airship = clif_changemap_airship;
clif->changemapcell = clif_changemapcell;
clif->map_property = clif_map_property;
clif->pvpset = clif_pvpset;