/*========================================== * *------------------------------------------*/ 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(); } socket_datasync(fd, true); chrif_skillid2idx(fd); return 0; }
/*========================================== * *------------------------------------------ */ static int chrif_connectack(Session *s, const Packet_Fixed<0x2af9>& fixed) { if (fixed.code) { PRINTF("Connecting to char-server failed %d.\n"_fmt, fixed.code); exit(1); } PRINTF("Connected to char-server (connection #%d).\n"_fmt, s); chrif_state = 1; chrif_sendmap(s); return 0; }
/*========================================== * *------------------------------------------ */ static int chrif_connectack(Session *s, const Packet_Fixed<0x2af9>& fixed) { if (fixed.code) { PRINTF("Connected to char-server failed %d.\n"_fmt, fixed.code); exit(1); } PRINTF("Connected to char-server (connection #%d).\n"_fmt, s); chrif_state = 1; chrif_sendmap(s); PRINTF("chrif: OnCharIfInit event done. (%d events)\n"_fmt, npc_event_doall(stringish<ScriptLabel>("OnCharIfInit"_s))); PRINTF("chrif: OnInterIfInit event done. (%d events)\n"_fmt, npc_event_doall(stringish<ScriptLabel>("OnInterIfInit"_s))); return 0; }
/*========================================== * *------------------------------------------*/ int chrif_connectack(int fd) { if (RFIFOB(fd,2)) { ShowFatalError("Connection to char-server failed %d.\n", RFIFOB(fd,2)); exit(1); } 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"OnCharIfInit"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnCharIfInit")); 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 = 1; ShowStatus("Event '"CL_WHITE"OnInterIfInitOnce"CL_RESET"' executed with '"CL_WHITE"%d"CL_RESET"' NPCs.\n", npc_event_doall("OnInterIfInitOnce")); } return 0; }
/*========================================== * *------------------------------------------*/ int chrif_connectack(int fd) { static bool char_init_done = false; if (RFIFOB(fd,2)) { ShowFatalError("Falha na conexao 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")); } return 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; }