Damage multipliers now effect damage modifiers - this also fixes a bug!
This commit is contained in:
parent
1378dcb815
commit
d290078790
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user