summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/map/clif.c20
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/packets.h4
3 files changed, 23 insertions, 2 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;
diff --git a/src/map/clif.h b/src/map/clif.h
index eb9881533..69b711dc2 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -759,6 +759,7 @@ struct clif_interface {
bool (*spawn) (struct block_list *bl);
/* map-related */
void (*changemap) (struct map_session_data *sd, short m, int x, int y);
+ void (*changemap_airship) (struct map_session_data *sd, short m, int x, int y);
void (*changemapcell) (int fd, int16 m, int x, int y, int type, enum send_target target);
void (*map_property) (struct map_session_data* sd, enum map_property property);
void (*pvpset) (struct map_session_data *sd, int pvprank, int pvpnum,int type);
diff --git a/src/map/packets.h b/src/map/packets.h
index 67d2d3410..eb1947a05 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -80,7 +80,7 @@ packet(0x008d,-1);
packet(0x008e,-1);
//packet(0x008f,-1);
packet(0x0090,7,clif->pNpcClicked,2);
-packet(0x0091,22);
+packet(0x0091,22); // ZC_NPCACK_MAPMOVE
packet(0x0092,28);
packet(0x0093,2);
packet(0x0094,6,clif->pGetCharNameRequest,2); // CZ_REQNAME
@@ -3397,7 +3397,7 @@ packet(0x96e,-1,clif->ackmergeitems);
// new packets
packet(0x0a49,22);
packet(0x0a4a,6);
- packet(0x0a4b,22);
+ packet(0x0a4b,22); // ZC_AIRSHIP_MAPMOVE
packet(0x0a4c,28);
#endif