Use double for multiplying damage. Fixes issue #25.

This commit is contained in:
drtshock 2014-07-05 23:52:07 -05:00
parent 3c2f48d582
commit 0d0085f423

View File

@ -378,7 +378,7 @@ public class FactionsEntityListener implements Listener {
// Damage will be dealt. However check if the damage should be reduced. // Damage will be dealt. However check if the damage should be reduced.
if (damage > 0.0 && ownTerritory && Conf.territoryShieldFactor > 0) { if (damage > 0.0 && ownTerritory && Conf.territoryShieldFactor > 0) {
int newDamage = (int) Math.ceil(damage * (1D - Conf.territoryShieldFactor)); double newDamage = Math.ceil(damage * (1D - Conf.territoryShieldFactor));
sub.setDamage(newDamage); sub.setDamage(newDamage);
// Send message // Send message