mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 08:27:45 +00:00
Only Attributes + Resistances with DBC Addon
This commit is contained in:
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())
|
||||
|
||||
Reference in new issue
Block a user