diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-06-27 19:47:25 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-06-29 19:46:09 +0300 |
commit | 6fa931559839564a3ddf21587c2d4322cc28fda4 (patch) | |
tree | c4522ca24b117705e64a5d49a2149fd9069da96b /src | |
parent | eacfb4ffc82a5dbe01284738544394bec7cc8c24 (diff) | |
download | hercules-6fa931559839564a3ddf21587c2d4322cc28fda4.tar.gz hercules-6fa931559839564a3ddf21587c2d4322cc28fda4.tar.bz2 hercules-6fa931559839564a3ddf21587c2d4322cc28fda4.tar.xz hercules-6fa931559839564a3ddf21587c2d4322cc28fda4.zip |
Add new field into packet char_send_map_info.
But unused for now.
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 13 | ||||
-rw-r--r-- | src/char/char.h | 2 |
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); |