From af3f27d93302e993a44bfa85fe43dc5e4d3b06ed Mon Sep 17 00:00:00 2001 From: zephyrus Date: Fri, 4 Jul 2008 10:51:36 +0000 Subject: [PATCH] - Timer set to -1 soon, previous to timer deletion :O git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12911 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/map/unit.c b/src/map/unit.c index 1da28c9e7f..d836a01e5c 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1521,11 +1521,7 @@ int unit_skillcastcancel(struct block_list *bl,int type) } ud->canact_tick = tick; - ud->skilltimer = -1; - if( sd && pc_checkskill(sd,SA_FREECAST) > 0 ) - status_calc_bl(&sd->bl, SCB_SPEED); - if(type&1 && sd) skill = sd->skillid_old; else @@ -1537,7 +1533,12 @@ int unit_skillcastcancel(struct block_list *bl,int type) ret=delete_timer( ud->skilltimer, skill_castend_id ); if(ret<0) ShowError("delete timer error : skillid : %d\n",ret); - + + ud->skilltimer = -1; + + if( sd && pc_checkskill(sd,SA_FREECAST) > 0 ) + status_calc_bl(&sd->bl, SCB_SPEED); + if(bl->type==BL_MOB) ((TBL_MOB*)bl)->skillidx = -1; clif_skillcastcancel(bl);