summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-03 03:24:58 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-03 03:24:58 +0000
commitae6b1fa5f282bfa9822a9a8edaa9fd2f89a3e4e8 (patch)
tree6349e6dcc9295178ee3ce4b18307e39831b15e08 /src/map/skill.c
parentf02e49e2f48c7aa316bffce2ec51357e9e869b7c (diff)
downloadhercules-ae6b1fa5f282bfa9822a9a8edaa9fd2f89a3e4e8.tar.gz
hercules-ae6b1fa5f282bfa9822a9a8edaa9fd2f89a3e4e8.tar.bz2
hercules-ae6b1fa5f282bfa9822a9a8edaa9fd2f89a3e4e8.tar.xz
hercules-ae6b1fa5f282bfa9822a9a8edaa9fd2f89a3e4e8.zip
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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c23
1 files changed, 16 insertions, 7 deletions
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;