|
@@ -8353,133 +8353,6 @@ static const struct _battle_data {
|
|
#include "../custom/battle_config_init.inc"
|
|
#include "../custom/battle_config_init.inc"
|
|
};
|
|
};
|
|
|
|
|
|
-#ifndef STATS_OPT_OUT
|
|
|
|
-// rAthena anonymous statistic usage report -- packet is built here, and sent to char server to report.
|
|
|
|
-void rAthena_report(char* date, char *time_c) {
|
|
|
|
- int i, rev = 0, bd_size = ARRAYLENGTH(battle_data);
|
|
|
|
- unsigned int config = 0;
|
|
|
|
- const char* rev_str;
|
|
|
|
- char timestring[25];
|
|
|
|
- time_t curtime;
|
|
|
|
- char* buf;
|
|
|
|
-
|
|
|
|
- enum config_table {
|
|
|
|
- C_CIRCULAR_AREA = 0x0001,
|
|
|
|
- C_CELLNOSTACK = 0x0002,
|
|
|
|
- C_BETA_THREAD_TEST = 0x0004,
|
|
|
|
- C_SCRIPT_CALLFUNC_CHECK = 0x0008,
|
|
|
|
- C_OFFICIAL_WALKPATH = 0x0010,
|
|
|
|
- C_RENEWAL = 0x0020,
|
|
|
|
- C_RENEWAL_CAST = 0x0040,
|
|
|
|
- C_RENEWAL_DROP = 0x0080,
|
|
|
|
- C_RENEWAL_EXP = 0x0100,
|
|
|
|
- C_RENEWAL_LVDMG = 0x0200,
|
|
|
|
- C_RENEWAL_ASPD = 0x0400,
|
|
|
|
- C_SECURE_NPCTIMEOUT = 0x0800,
|
|
|
|
- C_SQL_DBS = 0x1000,
|
|
|
|
- C_SQL_LOGS = 0x2000,
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- if( (rev_str = get_svn_revision()) != 0 )
|
|
|
|
- rev = atoi(rev_str);
|
|
|
|
-
|
|
|
|
- /* we get the current time */
|
|
|
|
- time(&curtime);
|
|
|
|
- strftime(timestring, 24, "%Y-%m-%d %H:%M:%S", localtime(&curtime));
|
|
|
|
-
|
|
|
|
-// Various compile-time options
|
|
|
|
-#ifdef CIRCULAR_AREA
|
|
|
|
- config |= C_CIRCULAR_AREA;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef CELL_NOSTACK
|
|
|
|
- config |= C_CELLNOSTACK;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef BETA_THREAD_TEST
|
|
|
|
- config |= C_BETA_THREAD_TEST;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef SCRIPT_CALLFUNC_CHECK
|
|
|
|
- config |= C_SCRIPT_CALLFUNC_CHECK;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef OFFICIAL_WALKPATH
|
|
|
|
- config |= C_OFFICIAL_WALKPATH;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef RENEWAL
|
|
|
|
- config |= C_RENEWAL;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef RENEWAL_CAST
|
|
|
|
- config |= C_RENEWAL_CAST;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef RENEWAL_DROP
|
|
|
|
- config |= C_RENEWAL_DROP;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef RENEWAL_EXP
|
|
|
|
- config |= C_RENEWAL_EXP;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef RENEWAL_LVDMG
|
|
|
|
- config |= C_RENEWAL_LVDMG;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef RENEWAL_ASPD
|
|
|
|
- config |= C_RENEWAL_ASPD;
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
-#ifdef SECURE_NPCTIMEOUT
|
|
|
|
- config |= C_SECURE_NPCTIMEOUT;
|
|
|
|
-#endif
|
|
|
|
- /* non-define part */
|
|
|
|
- if( db_use_sqldbs )
|
|
|
|
- config |= C_SQL_DBS;
|
|
|
|
-
|
|
|
|
- if( log_config.sql_logs )
|
|
|
|
- config |= C_SQL_LOGS;
|
|
|
|
-
|
|
|
|
-#define BFLAG_LENGTH 35
|
|
|
|
-
|
|
|
|
- CREATE(buf, char, 6 + 12 + 9 + 24 + 4 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) + 1 );
|
|
|
|
-
|
|
|
|
- /* build packet */
|
|
|
|
- WBUFW(buf,0) = 0x3000;
|
|
|
|
- WBUFW(buf,2) = 6 + 12 + 9 + 24 + 4 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) );
|
|
|
|
- WBUFW(buf,4) = 0x9c;
|
|
|
|
-
|
|
|
|
- safestrncpy(WBUFCP(buf,6), date, 12);
|
|
|
|
- safestrncpy(WBUFCP(buf,6 + 12), time_c, 9);
|
|
|
|
- safestrncpy(WBUFCP(buf,6 + 12 + 9), timestring, 24);
|
|
|
|
-
|
|
|
|
- WBUFL(buf,6 + 12 + 9 + 24) = rev;
|
|
|
|
- WBUFL(buf,6 + 12 + 9 + 24 + 4) = map_getusers();
|
|
|
|
-
|
|
|
|
- WBUFL(buf,6 + 12 + 9 + 24 + 4 + 4) = config;
|
|
|
|
- WBUFL(buf,6 + 12 + 9 + 24 + 4 + 4 + 4) = bd_size;
|
|
|
|
-
|
|
|
|
- for( i = 0; i < bd_size; i++ ) {
|
|
|
|
- safestrncpy(WBUFCP(buf,6 + 12 + 9+ 24 + 4 + 4 + 4 + 4 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, 35);
|
|
|
|
- WBUFL(buf,6 + 12 + 9 + 24 + 4 + 4 + 4 + 4 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- chrif_send_report(buf, 6 + 12 + 9 + 24 + 4 + 4 + 4 + 4 + ( bd_size * ( BFLAG_LENGTH + 4 ) ) );
|
|
|
|
-
|
|
|
|
- aFree(buf);
|
|
|
|
-
|
|
|
|
-#undef BFLAG_LENGTH
|
|
|
|
-}
|
|
|
|
-static int rAthena_report_timer(int tid, unsigned int tick, int id, intptr_t data) {
|
|
|
|
- if( chrif_isconnected() ) { /* char server relays it, so it must be online. */
|
|
|
|
- rAthena_report(__DATE__,__TIME__);
|
|
|
|
- }
|
|
|
|
- return 0;
|
|
|
|
-}
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
/*==========================
|
|
/*==========================
|
|
* Set battle settings
|
|
* Set battle settings
|
|
*--------------------------*/
|
|
*--------------------------*/
|
|
@@ -8654,12 +8527,6 @@ void do_init_battle(void)
|
|
{
|
|
{
|
|
delay_damage_ers = ers_new(sizeof(struct delay_damage),"battle.c::delay_damage_ers",ERS_OPT_CLEAR);
|
|
delay_damage_ers = ers_new(sizeof(struct delay_damage),"battle.c::delay_damage_ers",ERS_OPT_CLEAR);
|
|
add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
|
|
add_timer_func_list(battle_delay_damage_sub, "battle_delay_damage_sub");
|
|
-
|
|
|
|
-#ifndef STATS_OPT_OUT
|
|
|
|
- add_timer_func_list(rAthena_report_timer, "rAthena_report_timer");
|
|
|
|
- add_timer_interval(gettick() + 30000, rAthena_report_timer, 0, 0, 60000 * 30);
|
|
|
|
-#endif
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/*==================
|
|
/*==================
|