summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c13
-rw-r--r--src/char/char.h2
2 files changed, 12 insertions, 3 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 92b0209b2..6e0193780 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -4436,7 +4436,7 @@ void char_parse_char_connect(int fd, struct char_session_data* sd, uint32 ipl)
}
}
-void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd)
+void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost)
{
#if PACKETVER < 20170329
const int cmd = 0x71;
@@ -4452,6 +4452,15 @@ void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstat
mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), WFIFOP(fd, 6));
WFIFOL(fd, 22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip);
WFIFOW(fd, 26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!]
+#if PACKETVER < 20170329
+ memset(WFIFOP(fd, 28), 0, 128);
+#else
+ if (dnsHost != NULL) {
+ safestrncpy(WFIFOP(fd, 28), dnsHost, 128);
+ } else {
+ memset(WFIFOP(fd, 28), 0, 128);
+ }
+#endif
WFIFOSET(fd, len);
}
@@ -4612,7 +4621,7 @@ void char_parse_char_select(int fd, struct char_session_data* sd, uint32 ipl)
subnet_map_ip = chr->lan_subnet_check(ipl);
//Send player to map
- chr->send_map_info(fd, i, subnet_map_ip, cd);
+ chr->send_map_info(fd, i, subnet_map_ip, cd, NULL);
// create temporary auth entry
CREATE(node, struct char_auth_node, 1);
diff --git a/src/char/char.h b/src/char/char.h
index 93b236966..a644f11ab 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -240,7 +240,7 @@ struct char_interface {
void (*delete2_cancel) (int fd, struct char_session_data* sd);
void (*send_account_id) (int fd, int account_id);
void (*parse_char_connect) (int fd, struct char_session_data* sd, uint32 ipl);
- void (*send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd);
+ void (*send_map_info) (int fd, int i, uint32 subnet_map_ip, struct mmo_charstatus *cd, char *dnsHost);
void (*send_wait_char_server) (int fd);
int (*search_default_maps_mapserver) (struct mmo_charstatus *cd);
void (*parse_char_select) (int fd, struct char_session_data* sd, uint32 ipl);