summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-22 00:34:06 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-28 04:41:41 +0300
commitb830a1528eb4a77cbd62fb9d8d4d855f9ae23261 (patch)
tree132fe19202e710d9ba396af80c3a8cf75b176370 /src/map/clif.c
parent95e77d7d3cb31c7db1df2adb75436db2c37d8211 (diff)
downloadhercules-b830a1528eb4a77cbd62fb9d8d4d855f9ae23261.tar.gz
hercules-b830a1528eb4a77cbd62fb9d8d4d855f9ae23261.tar.bz2
hercules-b830a1528eb4a77cbd62fb9d8d4d855f9ae23261.tar.xz
hercules-b830a1528eb4a77cbd62fb9d8d4d855f9ae23261.zip
Add missing field into packet ZC_NPCACK_SERVERMOVE.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 2076a922b..3dae902cb 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2010,8 +2010,8 @@ static void clif_changemap_airship(struct map_session_data *sd, short m, int x,
/// 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
-static void clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port)
+/// 0ac7 <map name>.16B <x>.W <y>.W <ip>.L <port>.W <dns host>.128B
+static void clif_changemapserver(struct map_session_data *sd, unsigned short map_index, int x, int y, uint32 ip, uint16 port, char *dnsHost)
{
int fd;
#if PACKETVER >= 20170315
@@ -2029,6 +2029,15 @@ static void clif_changemapserver(struct map_session_data *sd, unsigned short map
WFIFOW(fd, 20) = y;
WFIFOL(fd, 22) = htonl(ip);
WFIFOW(fd, 26) = sockt->ntows(htons(port)); // [!] LE byte order here [!]
+
+#if PACKETVER >= 20170315
+ if (dnsHost != NULL) {
+ safestrncpy(WFIFOP(fd, 28), dnsHost, 128);
+ } else {
+ memset(WFIFOP(fd, 28), 0, 128);
+ }
+#endif
+
WFIFOSET(fd, packet_len(cmd));
}