From ad8b21eed7219a457340278ed39642578d48b2eb Mon Sep 17 00:00:00 2001 From: Inkfish Date: Fri, 21 Aug 2009 06:21:44 +0000 Subject: Added bMagicHPGainValue and bMagicSPGainValue. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14018 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index 9d8c3d6c2..1ed612dee 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1234,13 +1234,21 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * status_heal(src, 0, status_get_lv(bl)*(95+15*rate)/100, 2); } - if( sd && status_isdead(bl) && attack_type&BF_WEAPON ) + if( sd && status_isdead(bl) ) { int sp = 0, hp = 0; - sp += sd->sp_gain_value; - sp += sd->sp_gain_race[status_get_race(bl)]; - sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS]; - hp += sd->hp_gain_value; + if( attack_type&BF_WEAPON ) + { + sp += sd->sp_gain_value; + sp += sd->sp_gain_race[status_get_race(bl)]; + sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS]; + hp += sd->hp_gain_value; + } + if( attack_type&BF_MAGIC ) + { + sp += sd->magic_sp_gain_value; + hp += sd->magic_hp_gain_value; + } if( hp || sp ) status_heal(src, hp, sp, battle_config.show_hp_sp_gain?2:0); } -- cgit v1.2.3-70-g09d2