diff options
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index 9e8b18d3b..c2067dbd1 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -48,6 +48,8 @@ static const int packet_len_table[0x3d] = { // U - used, F - free -1,10, 8, 2, 2,14,19,19, // 2b20-2b27: U->2b20, U->2b21, U->2b22, U->2b23, U->2b24, U->2b25, U->2b26, U->2b27 }; +struct chrif_interface chrif_s; + //Used Packets: //2af8: Outgoing, chrif_connect -> 'connect to charserver / auth @ charserver' //2af9: Incoming, chrif_connectack -> 'answer of the 2af8 login(ok / fail)' @@ -456,7 +458,7 @@ int chrif_connectack(int fd) { ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd); chrif_state = 1; - chrif->chrif_connected = 1; + chrif->connected = 1; chrif_sendmap(fd); @@ -1331,9 +1333,9 @@ int chrif_char_online(struct map_session_data *sd) { /// Called when the connection to Char Server is disconnected. void chrif_on_disconnect(void) { - if( chrif->chrif_connected != 1 ) + if( chrif->connected != 1 ) ShowWarning("Connection to Char Server lost.\n\n"); - chrif->chrif_connected = 0; + chrif->connected = 0; chrif->other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect. iMap->eraseallipport(); @@ -1544,7 +1546,7 @@ static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_ realloc_fifo(char_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK); chrif_connect(char_fd); - chrif->chrif_connected = (chrif_state == 2); + chrif->connected = (chrif_state == 2); srvinfo = 0; } else { if (srvinfo == 0) { @@ -1657,7 +1659,7 @@ void chrif_defaults(void) { /* vars */ - chrif->chrif_connected = 0; + chrif->connected = 0; chrif->other_mapserver_count = 0; /* funcs */ |