Fixed elemental armor not reducing damage to 0 in pre-renewal (fixes #924)
This commit is contained in:
parent
3f78f16db9
commit
dbb19abb66
@ -513,12 +513,15 @@ int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 d
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ratio < 100)
|
#ifdef RENEWAL
|
||||||
damage = damage - (damage * (100 - ratio) / 100);
|
//In renewal, reductions are always rounded down so damage can never reach 0 unless ratio is 0
|
||||||
else
|
damage = damage - (int64)((damage * (100 - ratio)) / 100);
|
||||||
damage = damage + (damage * (ratio - 100) / 100);
|
#else
|
||||||
|
damage = (int64)((damage*ratio)/100);
|
||||||
|
#endif
|
||||||
|
|
||||||
return i64max(damage,0);
|
//Damage can be negative, see battle_config.attr_recover
|
||||||
|
return damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user