From ae6b1fa5f282bfa9822a9a8edaa9fd2f89a3e4e8 Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 3 Jul 2008 03:24:58 +0000 Subject: Adjusted Free Cast code so that its walk penalty gets calculated in status_calc_speed and nowhere else. Removed aspd penalty from Free Cast since tests show it's not there, even though RO sites claim it is. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12904 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index f106ebd57..bcff361dc 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -5241,15 +5241,21 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data) return 0; } - if(ud->skillid != SA_CASTCANCEL ) { + if(ud->skillid != SA_CASTCANCEL ) + {// otherwise handled in unit_skillcastcancel() if( ud->skilltimer != tid ) { ShowError("skill_castend_id: Timer mismatch %d!=%d!\n", ud->skilltimer, tid); ud->skilltimer = -1; return 0; } - if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST)) - status_freecast_switch(sd); - ud->skilltimer=-1; + + if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 ) + {// restore original walk speed + ud->skilltimer = -1; + status_calc_bl(&sd->bl, SCB_SPEED); + } + + ud->skilltimer = -1; } if (ud->skilltarget == id) @@ -5473,10 +5479,13 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr data) return 0; } - if(sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST)) - status_freecast_switch(sd); - + if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 ) + {// restore original walk speed + ud->skilltimer=-1; + status_calc_bl(&sd->bl, SCB_SPEED); + } ud->skilltimer=-1; + do { if(status_isdead(src)) break; -- cgit v1.2.3-60-g2f50