Apple Attributes for Items if DBC is not available, Resistances Always

This commit is contained in:
Kam committed 2025-03-09 16:08:26 -04:00
1 parent 6c1330552b
commit 710cb04f8d
1 file changed
+5 -6
@@ -565,13 +565,12 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
} else if (attackingEntity instanceof EntityPlayer && faction.isFriendlyToPlayer((EntityPlayer) attackingEntity))
return false;
// Attribute + Resistances
if(!DBCAddon.IsAvailable()){
if(attackingEntity instanceof EntityPlayer)
i = AttributeAttackUtil.calculateDamagePlayerToNPC((EntityPlayer) attackingEntity, this, i);
// Attribute
if(!DBCAddon.IsAvailable() && attackingEntity instanceof EntityPlayer)
i = AttributeAttackUtil.calculateDamagePlayerToNPC((EntityPlayer) attackingEntity, this, i);
i = stats.resistances.applyResistance(damagesource, i);
}
// Resistances
i = stats.resistances.applyResistance(damagesource, i);
NpcEvent.DamagedEvent event = new NpcEvent.DamagedEvent(this.wrappedNPC, attackingEntity, i, damagesource);
if (EventHooks.onNPCDamaged(this, event) || isKilled())