summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-18 18:15:31 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-02-18 18:15:31 +0000
commitb687d790d516bf46dd03767f0e479b4a6a41eac2 (patch)
treebbe7f0bfd5049093d03d85e6e5c0e18d9c082762 /src/map/battle.c
parent54d59b3f91a08ffc70e6a2f22776a1de25f89d93 (diff)
downloadhercules-b687d790d516bf46dd03767f0e479b4a6a41eac2.tar.gz
hercules-b687d790d516bf46dd03767f0e479b4a6a41eac2.tar.bz2
hercules-b687d790d516bf46dd03767f0e479b4a6a41eac2.tar.xz
hercules-b687d790d516bf46dd03767f0e479b4a6a41eac2.zip
Added 2 new item bonuses as per kenpachi's request:
- bonus2 bHPGainRaceAttack - bonus2 bSPGainRaceAttack git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15608 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 3ca8480b4..1853b9cf1 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3792,7 +3792,7 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int rdamage, int ldamage,
sp = wd->sp_drain[type].value;
if (wd->sp_drain[type].rate)
sp += battle_calc_drain(*damage, wd->sp_drain[type].rate, wd->sp_drain[type].per);
-
+
if (hp) {
if (wd->hp_drain[type].type)
rhp += hp;
@@ -3807,6 +3807,12 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int rdamage, int ldamage,
if (sd->sp_vanish_rate && rnd()%1000 < sd->sp_vanish_rate)
status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->sp_vanish_per, false);
+
+ if( sd->sp_gain_race_attack[race] )
+ tsp += sd->sp_gain_race_attack[race];
+ if( sd->hp_gain_race_attack[race] )
+ thp += sd->hp_gain_race_attack[race];
+
if (!thp && !tsp) return;
status_heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain?3:1);