From 81a85e322a784f6237b1948c53dca39bffb42f18 Mon Sep 17 00:00:00 2001 From: Inkfish Date: Thu, 7 May 2009 12:15:14 +0000 Subject: * 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 --- src/map/unit.c | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'src/map/unit.c') 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); -- cgit v1.2.3-70-g09d2