summaryrefslogtreecommitdiff
path: root/src/map/unit.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/unit.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/unit.c')
-rw-r--r--src/map/unit.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 07607603e..1da28c9e7 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1086,8 +1086,8 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
if(casttime > 0) {
ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
- if(sd && pc_checkskill(sd,SA_FREECAST))
- status_freecast_switch(sd);
+ if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
+ status_calc_bl(&sd->bl, SCB_SPEED);
else
unit_stop_walking(src,1);
}
@@ -1187,8 +1187,8 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
if(casttime > 0) {
ud->skilltimer = add_timer( tick+casttime, skill_castend_pos, src->id, 0 );
- if(sd && pc_checkskill(sd,SA_FREECAST))
- status_freecast_switch(sd);
+ if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
+ status_calc_bl(&sd->bl, SCB_SPEED);
else
unit_stop_walking(src,1);
}
@@ -1520,9 +1520,11 @@ int unit_skillcastcancel(struct block_list *bl,int type)
return 0;
}
- ud->canact_tick=tick;
- if(sd && pc_checkskill(sd,SA_FREECAST))
- status_freecast_switch(sd);
+ 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;
@@ -1538,7 +1540,6 @@ int unit_skillcastcancel(struct block_list *bl,int type)
if(bl->type==BL_MOB) ((TBL_MOB*)bl)->skillidx = -1;
- ud->skilltimer = -1;
clif_skillcastcancel(bl);
return 1;
}