From 9494fde90d8fe5cbffb324663d5d2d5b48ee601b Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 11 Oct 2007 09:07:44 +0000 Subject: Removed the check that prevented Warp Portal from opening after you picked the destination, if there was someone blocking the cell. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11406 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index d30f41873..690477d10 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -117,21 +117,25 @@ static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) return 0; } -int pc_setinvincibletimer(struct map_session_data *sd,int val) +void pc_setinvincibletimer(struct map_session_data* sd, int val) { - nullpo_retr(0, sd); + nullpo_retv(sd); - if(sd->invincible_timer != INVALID_TIMER) + if( sd->invincible_timer != INVALID_TIMER ) delete_timer(sd->invincible_timer,pc_invincible_timer); sd->invincible_timer = add_timer(gettick()+val,pc_invincible_timer,sd->bl.id,0); - return 0; } -void pc_delinvincibletimer_sub(struct map_session_data *sd) +void pc_delinvincibletimer(struct map_session_data* sd) { - delete_timer(sd->invincible_timer,pc_invincible_timer); - sd->invincible_timer = INVALID_TIMER; - skill_unit_move(&sd->bl,gettick(),1); + nullpo_retv(sd); + + if( sd->invincible_timer != INVALID_TIMER ) + { + delete_timer(sd->invincible_timer,pc_invincible_timer); + sd->invincible_timer = INVALID_TIMER; + skill_unit_move(&sd->bl,gettick(),1); + } } static int pc_spiritball_timer(int tid,unsigned int tick,int id,int data) -- cgit v1.2.3-60-g2f50