Пример #1
0
/// Called when the connection to Char Server is disconnected.
void chrif_on_disconnect(void) {
	if( chrif_connected != 1 )
		ShowWarning("Connection to Char Server lost.\n\n");
	chrif_connected = 0;
	
 	other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect.
	map_eraseallipport();

	//Attempt to reconnect in a second. [Skotlex]
	add_timer(gettick() + 1000, check_connect_char_server, 0, 0);
}
Пример #2
0
int chrif_disconnect(int fd)
{
	if(fd == char_fd) {
		char_fd = 0;
		ShowWarning("Map Server disconnected from Char Server.\n\n");
		chrif_connected = 0;
		
	 	other_mapserver_count=0; //Reset counter. We receive ALL maps from all map-servers on reconnect.
		map_eraseallipport();

		//Attempt to reconnect in a second. [Skotlex]
		add_timer(gettick() + 1000, check_connect_char_server, 0, 0);
	}
	return 0;
}