From 60f4f086eeeb609a1c3805f749fbcf941365ecc9 Mon Sep 17 00:00:00 2001 From: Lupus Date: Mon, 20 Dec 2004 18:03:48 +0000 Subject: moved int pc_alive_timer(int tid,unsigned int tick,int id,int git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@665 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/map/pc.c b/src/map/pc.c index 40b8491b5..90736dd1e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7694,6 +7694,20 @@ 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); + nullpo_retr(0, sd); + if(sd->alive_timer != tid) + return 0; + map_quit(sd); + return 0; +} + void pc_setstand(struct map_session_data *sd){ nullpo_retv(sd); @@ -8111,14 +8125,3 @@ int do_init_pc(void) { return 0; } - -//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); - nullpo_retr(0, sd); - if(sd->alive_timer != tid) - return 0; - map_quit(sd); - return 0; -} \ No newline at end of file -- cgit v1.2.3-70-g09d2