From d29007879089d317dd6b0f954f0fa6ee5db21499 Mon Sep 17 00:00:00 2001 From: Cheese Date: Sat, 11 Apr 2015 16:33:18 +1000 Subject: [PATCH] Damage multipliers now effect damage modifiers - this also fixes a bug! --- .../minecraft/game/core/damage/CustomDamageEvent.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java index c92e63a57..e7b460fe3 100644 --- a/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java +++ b/Plugins/Mineplex.Minecraft.Game.Core/src/mineplex/minecraft/game/core/damage/CustomDamageEvent.java @@ -50,7 +50,7 @@ public class CustomDamageEvent extends Event implements Cancellable { _eventCause = cause; - if (initialSource == null || initialReason == null) + //if (initialSource == null || initialReason == null) _initialDamage = damage; _damageeEntity = damagee; @@ -66,7 +66,7 @@ public class CustomDamageEvent extends Event implements Cancellable _ignoreArmor = ignoreArmor; if (initialSource != null && initialReason != null) - AddMod(initialSource, initialReason, damage, true); + AddMod(initialSource, initialReason, 0, true); if (_eventCause == DamageCause.FALL) _ignoreArmor = true; @@ -116,11 +116,11 @@ public class CustomDamageEvent extends Event implements Cancellable { double damage = GetDamageInitial(); - for (DamageChange mult : _damageMult) - damage *= mult.GetDamage(); - for (DamageChange mult : _damageMod) damage += mult.GetDamage(); + + for (DamageChange mult : _damageMult) + damage *= mult.GetDamage(); return damage; }