Ejemplo n.º 1
0
/*==========================================
 *
 *------------------------------------------*/
int chrif_connectack(int fd) {
	static bool char_init_done = false;

	if (RFIFOB(fd,2)) {
		ShowFatalError("Falha na conexão com o servidor de personagens %d.\n", RFIFOB(fd,2));
		exit(EXIT_FAILURE);
	}

	ShowStatus("Conexao com o Servidor de Personagens efetuada com sucesso (Conexao: '"CL_WHITE"%d"CL_RESET"').\n",fd);
	chrif_state = 1;
	chrif_connected = 1;

	chrif_sendmap(fd);

	ShowStatus("Evento '"CL_WHITE"OnInterIfInit"CL_RESET"' executado com '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
	if( !char_init_done ) {
		char_init_done = true;
		ShowStatus("Evento '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executado com '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
		guild_castle_map_init();
	}

	return 0;
}
Ejemplo n.º 2
0
/*==========================================
 *
 *------------------------------------------*/
int chrif_connectack(int fd) {
	static bool char_init_done = false;

	if (RFIFOB(fd,2)) {
		ShowFatalError("Connection to char-server failed %d.\n", RFIFOB(fd,2));
		exit(EXIT_FAILURE);
	}

	ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd);
	chrif_state = 1;
	chrif_connected = 1;

	chrif_sendmap(fd);

	ShowStatus("Event '"CL_WHITE"OnInterIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
	if( !char_init_done ) {
		char_init_done = true;
		ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
		guild_castle_map_init();
	}

	return 0;
}
Ejemplo n.º 3
0
/*==========================================
 *
 *------------------------------------------*/
int chrif_connectack(int fd)
{
	static bool char_init_done = false;

	if (RFIFOB(fd,2)) {
		ShowFatalError("Conexуo ao char-server falhou %d.\n", RFIFOB(fd,2));
		exit(EXIT_FAILURE);
	}

	ShowStatus("Ъxito na conexуo ao char-server (Conexуo: '"CL_WHITE"%d"CL_RESET"').\n",fd);
	chrif_state = 1;
	chrif_connected = 1;

	chrif_sendmap(fd);

	ShowStatus("Evento '"CL_WHITE"OnInterIfInit"CL_RESET"' executado com '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInit"));
	if( !char_init_done ) {
		char_init_done = true;
		ShowStatus("Evento '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executado com '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce"));
		guild_castle_map_init();
	}

	return 0;
}