summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-07 12:15:14 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-07 12:15:14 +0000
commit81a85e322a784f6237b1948c53dca39bffb42f18 (patch)
tree575dbb13c007d1b2e42881993c0cdd2ea86b4dfe /src/map/unit.c
parenta609245253626fd1d8112d4b05959471723b7d8f (diff)
downloadhercules-81a85e322a784f6237b1948c53dca39bffb42f18.tar.gz
hercules-81a85e322a784f6237b1948c53dca39bffb42f18.tar.bz2
hercules-81a85e322a784f6237b1948c53dca39bffb42f18.tar.xz
hercules-81a85e322a784f6237b1948c53dca39bffb42f18.zip
* Fixed splash damage from Baphomet Card might miss. [Inkfish]
* Check if group unit is expired before processing it. (bugreport:3054) [Inkfish] * Fixed Grand Corss outdated behavior (bugreport:1590) [Inkfish] - use new damage formula - DEF is reduced to 2/3 during cast time - block shields switching within attack duration - monsters don't damage themselves any more - intervals between hits are 300ms git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13736 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);