summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c40
1 files changed, 30 insertions, 10 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index bd2997723..b5a56fb4b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1072,14 +1072,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
ud->canact_tick = tick + casttime + 100;
if ( battle_config.display_status_timers && sd )
clif_status_change(src, SI_ACTIONDELAY, 1, casttime);
- if( sd )
- {
- switch( skill_num )
- {
- case CG_ARROWVULCAN:
- sd->canequip_tick = tick + casttime;
- }
- }
+
ud->skilltarget = target_id;
ud->skillx = 0;
ud->skilly = 0;
@@ -1099,9 +1092,24 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
status_calc_bl(&sd->bl, SCB_SPEED);
else
unit_stop_walking(src,1);
+
+ if( sd )
+ {
+ switch( skill_num )
+ {
+ case CG_ARROWVULCAN:
+ sd->canequip_tick = tick + casttime;
+ break;
+ case CR_GRANDCROSS:
+ case NPC_GRANDDARKNESS:
+ status_calc_bl(src, SCB_DEF);
+ break;
+ }
+ }
}
else
skill_castend_id(ud->skilltimer,tick,src->id,0);
+
return 1;
}
@@ -1613,8 +1621,6 @@ int unit_skillcastcancel(struct block_list *bl,int type)
ud->canact_tick = tick;
if ( battle_config.display_status_timers && sd )
clif_status_change(bl, SI_ACTIONDELAY, 0, 0);
- if( sd )
- sd->canequip_tick = tick;
if(type&1 && sd)
skill = sd->skillid_old;
@@ -1633,6 +1639,20 @@ int unit_skillcastcancel(struct block_list *bl,int type)
if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
status_calc_bl(&sd->bl, SCB_SPEED);
+ if( sd )
+ {
+ switch( skill )
+ {
+ case CG_ARROWVULCAN:
+ sd->canequip_tick = tick;
+ break;
+ case CR_GRANDCROSS:
+ case NPC_GRANDDARKNESS:
+ status_calc_bl(bl, SCB_DEF);
+ break;
+ }
+ }
+
if(bl->type==BL_MOB) ((TBL_MOB*)bl)->skillidx = -1;
clif_skillcastcancel(bl);