Only Attributes + Resistances with DBC Addon

This commit is contained in:
Kam committed 2025-03-09 03:17:21 -04:00
1 parent f30cbf78f3
commit 5ab2203a8a
3 files changed
+26 -15

No files matched your search

@@ -565,11 +565,13 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
} else if (attackingEntity instanceof EntityPlayer && faction.isFriendlyToPlayer((EntityPlayer) attackingEntity))
return false;
// Magic / Attribute Damage
if(attackingEntity instanceof EntityPlayer)
i = AttributeAttackUtil.calculateDamagePlayerToNPC((EntityPlayer) attackingEntity, this, i);
// Attribute + Resistances
if(!DBCAddon.IsAvailable()){
if(attackingEntity instanceof EntityPlayer)
i = AttributeAttackUtil.calculateDamagePlayerToNPC((EntityPlayer) attackingEntity, this, i);
i = stats.resistances.applyResistance(damagesource, i);
i = stats.resistances.applyResistance(damagesource, i);
}
NpcEvent.DamagedEvent event = new NpcEvent.DamagedEvent(this.wrappedNPC, attackingEntity, i, damagesource);
if (EventHooks.onNPCDamaged(this, event) || isKilled())