diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 5 | ||||
-rw-r--r-- | src/map/map.c | 8 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/party.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 30 | ||||
-rw-r--r-- | src/map/pc.h | 3 |
6 files changed, 6 insertions, 43 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index af89df654..0412192e1 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7545,11 +7545,6 @@ void clif_parse_TickSend(int fd, struct map_session_data *sd) { break; } - //double connection bug fix by Valaris - if(sd->alive_timer > 0) - delete_timer(sd->alive_timer,pc_alive_timer); - sd->alive_timer=add_timer(gettick()+60*1000,pc_alive_timer,sd->bl.id,0); - sd->server_tick = gettick(); clif_servertick(sd); } diff --git a/src/map/map.c b/src/map/map.c index 6c028628d..039bdc5f2 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1051,12 +1051,6 @@ int map_quit(struct map_session_data *sd) { storage_storage_dirty(sd); storage_storage_save(sd); - //double connect bug fix by Valaris - if(sd->alive_timer > 0) { - delete_timer(sd->alive_timer,pc_alive_timer); - sd->alive_timer = -1; // not 0, the server will assume it's still active - } - if( sd->npc_stackbuf && sd->npc_stackbuf != NULL) { free( sd->npc_stackbuf ); sd->npc_stackbuf = NULL; @@ -2440,6 +2434,8 @@ int sql_config_read(char *cfgName) strcpy(login_server_pw, w2); } else if(strcmpi(w1,"login_server_db")==0){ strcpy(login_server_db, w2); + } else if(strcmpi(w1,"stall_time")==0){ + stall_time_ = atoi(w2); } else if(strcmpi(w1,"lowest_gm_level")==0){ lowest_gm_level = atoi(w2); } else if(strcmpi(w1,"read_gm_interval")==0){ diff --git a/src/map/map.h b/src/map/map.h index 289e8338b..f25ebba30 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -332,7 +332,6 @@ struct map_session_data { int last_skillid,last_skilllv; // Added by RoVeRT unsigned char change_level; // [celest] - int alive_timer; //[Valaris] #ifndef TXT_ONLY int mail_counter; // mail counter for mail system [Valaris] diff --git a/src/map/party.c b/src/map/party.c index ddaed7fc7..28f05bab9 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -591,7 +591,7 @@ int party_exp_share(struct party *p,int map,int base_exp,int job_exp,int zeny) return 0; for(i=0;i<MAX_PARTY;i++) if((sd=p->member[i].sd)!=NULL && sd->bl.m==map && session[sd->fd] != NULL) { - if (/* pc_issit(sd) || */ sd->chatID || (sd->idletime < (time(0) - 120))) + if (/* pc_issit(sd) || */ sd->chatID || (sd->idletime < (tick_ - 120))) continue; #ifdef TWILIGHT pc_gainexp(sd,base_exp,job_exp); diff --git a/src/map/pc.c b/src/map/pc.c index 14ee9b097..3dbfc4e88 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4016,11 +4016,6 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt // map_addblock(&sd->bl); /// ブロック登?とspawnは // clif_spawnpc(sd); - //double connection bug fix by Valaris - if(sd->alive_timer > 0) - delete_timer(sd->alive_timer,pc_alive_timer); - sd->alive_timer=add_timer(gettick()+60*1000,pc_alive_timer,sd->bl.id,0); - return 0; } @@ -4323,7 +4318,7 @@ int pc_walktoxy(struct map_session_data *sd,int x,int y) sd->to_x=x; sd->to_y=y; - sd->idletime = time(0); + sd->idletime = tick_; if(sd->walktimer != -1 && sd->state.change_walk_target==0){ // 現在?いている最中の目的地?更なのでマス目の中心に?た暫ノ @@ -4652,7 +4647,7 @@ int pc_attack_timer(int tid,unsigned int tick,int id,int data) if(sd == NULL) return 0; - sd->idletime = time(0); + sd->idletime = tick_; if(sd->attacktimer != tid){ if(battle_config.error_log) @@ -4773,7 +4768,7 @@ int pc_attack(struct map_session_data *sd,int target_id,int type) if(bl==NULL) return 1; - sd->idletime = time(0); + sd->idletime = tick_; if(bl->type==BL_NPC) { // monster npcs [Valaris] //npc_click(sd,RFIFOL(sd->fd,2)); @@ -7894,24 +7889,6 @@ int map_night_timer(int tid, unsigned int tick, int id, int data) { // by [yor] return 0; } -/*========================================== - * I'm alive timer (to prevent double connect bug) by Valaris - *------------------------------------------ - */ -int pc_alive_timer(int tid,unsigned int tick,int id,int data) -{ - //struct map_session_data *sd=(struct map_session_data*)map_id2bl(id); - struct map_session_data *sd=map_id2sd(id); // more accurate [celest] - nullpo_retr(0, sd); - if(sd->alive_timer != tid) - return 0; - sd->alive_timer = -1; -// map_quit(sd); - clif_timedout (sd); - - return 0; -} - void pc_setstand(struct map_session_data *sd){ nullpo_retv(sd); @@ -8308,7 +8285,6 @@ int do_init_pc(void) { // add night/day timer (by [yor]) add_timer_func_list(map_day_timer, "map_day_timer"); // by [yor] add_timer_func_list(map_night_timer, "map_night_timer"); // by [yor] - add_timer_func_list(pc_alive_timer, "pc_alive_timer"); //by Valaris { int day_duration = battle_config.day_duration; int night_duration = battle_config.night_duration; diff --git a/src/map/pc.h b/src/map/pc.h index a32926886..02dfcb74a 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -200,8 +200,5 @@ extern int night_timer_tid; int map_day_timer(int,unsigned int,int,int); // by [yor] int map_night_timer(int,unsigned int,int,int); // by [yor] -//double connect bug fix -int pc_alive_timer(int tid,unsigned int tick,int,int); - #endif |