summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2015-12-26 00:09:36 +0800
committerJedzkie <jedzkie13@rocketmail.com>2015-12-26 00:09:36 +0800
commit2dd2e23be8031e007708b6641736f5821c2abb82 (patch)
tree2b829b8c97c4c090f34044258d667293323c29ae
parent3f13598714f2d6cecb1c1e5c382592a904798624 (diff)
downloadhercules-2dd2e23be8031e007708b6641736f5821c2abb82.tar.gz
hercules-2dd2e23be8031e007708b6641736f5821c2abb82.tar.bz2
hercules-2dd2e23be8031e007708b6641736f5821c2abb82.tar.xz
hercules-2dd2e23be8031e007708b6641736f5821c2abb82.zip
Follow up https://github.com/Jedzkie/Hercules/commit/3f13598714f2d6cecb1c1e5c382592a904798624, thanks to dastgir.
-rw-r--r--src/map/battle.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 6c0e57863..65038f240 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5668,16 +5668,14 @@ struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct bl
} else // Some skills like Weaponry Research will cause damage even if attack is dodged
d.dmg_lv = ATK_DEF;
- // HPVanishRate
if (sd && d.damage + d.damage2 > 1) {
+ // HPVanishRate
if (sd->bonus.hp_vanish_rate && sd->bonus.hp_vanish_trigger && rnd() % 1000 < sd->bonus.hp_vanish_rate &&
((d.flag&sd->bonus.hp_vanish_trigger&BF_WEAPONMASK) || (d.flag&sd->bonus.hp_vanish_trigger&BF_RANGEMASK)
|| (d.flag&sd->bonus.hp_vanish_trigger&BF_SKILLMASK)))
status_percent_damage(&sd->bl, target, -sd->bonus.hp_vanish_per, 0, false);
- }
- // SPVanishRate
- if (sd && d.damage + d.damage2 > 1) {
+ // SPVanishRate
if (sd->bonus.sp_vanish_rate && sd->bonus.sp_vanish_trigger && rnd() % 1000 < sd->bonus.sp_vanish_rate &&
((d.flag&sd->bonus.sp_vanish_trigger&BF_WEAPONMASK) || (d.flag&sd->bonus.sp_vanish_trigger&BF_RANGEMASK)
|| (d.flag&sd->bonus.sp_vanish_trigger&BF_SKILLMASK)))