コード例 #1
0
ファイル: chrif.c プロジェクト: Shaktoh/Hercules
/// 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
ファイル: chrif.c プロジェクト: AxlSckay/Ragnarok-OldTimes
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;
}