Corrected ShortWeaponDamageReturn behavior (#2744)

* Fixes #2685.
* Item bonus ShortWeaponDamageReturn should work in all cases.
Thanks to @kyeme and @zakudam!
This commit is contained in:
Aleos
2018-03-20 12:07:10 -04:00
committed by GitHub
parent 41ea1531bc
commit 333f0dddc8

View File

@@ -6851,7 +6851,7 @@ int64 battle_calc_return_damage(struct block_list* bl, struct block_list *src, i
ssc = status_get_sc(src);
if (flag & BF_SHORT) {//Bounces back part of the damage.
if ( !status_reflect && sd && sd->bonus.short_weapon_damage_return ) {
if ( sd && sd->bonus.short_weapon_damage_return ) {
rdamage += damage * sd->bonus.short_weapon_damage_return / 100;
rdamage = i64max(rdamage,1);
} else if( status_reflect && sc && sc->count ) {