From 728a91da0f970e60a89ad79827dd64129a8ce561 Mon Sep 17 00:00:00 2001 From: xXVevzZXx Date: Fri, 15 Jul 2016 04:57:44 +0200 Subject: [PATCH] adding damage outsid ethe loop --- .../arcade/game/games/minestrike/GunModule.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/GunModule.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/GunModule.java index 93860fbba..e4dbe64ba 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/GunModule.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/minestrike/GunModule.java @@ -1026,24 +1026,25 @@ public class GunModule implements Listener if (EnableNormalArmor) { + + double armomrDamage = 0; + for (ItemStack item : event.GetDamageePlayer().getInventory().getArmorContents()) { if (item == null) continue; - double armomrDamage = 0; - if (item.getType().toString().contains("DIAMOND")) armomrDamage -= 1; if (item.getType().toString().contains("GOLD")) armomrDamage -= 0.5; if (item.getType().toString().contains("IRON")) armomrDamage -= 0.75; if (item.getType().toString().contains("LEATHER")) armomrDamage -= 0.25; if (item.getType().toString().contains("CHAIN")) armomrDamage -= 0.5; - - if (event.GetDamage() - armomrDamage <= 0) - armomrDamage = -(event.GetDamage() - 1); - - event.AddMod(event.GetDamageePlayer().getName(), "Armor", armomrDamage, false); } + + if (event.GetDamage() - armomrDamage <= 0) + armomrDamage = -(event.GetDamage() - 1); + + event.AddMod(event.GetDamageePlayer().getName(), "Armor", armomrDamage, false); } event.SetKnockback(false);