fix: Fixes NPC acquire on being attacked (#2334)

This commit is contained in:
Kamron Batman 2026-02-11 00:49:29 -08:00 committed by GitHub
parent 0b8dcdfeaf
commit 7fe9712593
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -798,7 +798,7 @@ public abstract partial class BaseAI
|| Mobile.GetEthicAllegiance(m) == BaseCreature.Allegiance.Enemy; || Mobile.GetEthicAllegiance(m) == BaseCreature.Allegiance.Enemy;
// Valid if FightMode is Evil and the target's karma is negative // Valid if FightMode is Evil and the target's karma is negative
return !valid && acqType != FightMode.Evil || (bc?.GetMaster()?.Karma ?? m.Karma) >= 0; return !valid && (acqType != FightMode.Evil || (bc?.GetMaster()?.Karma ?? m.Karma) >= 0);
} }
private bool IsHostile(Mobile from) => Mobile.Combatant == from || from.Combatant == Mobile || IsAggressor(from) || IsAggressed(from); private bool IsHostile(Mobile from) => Mobile.Combatant == from || from.Combatant == Mobile || IsAggressor(from) || IsAggressed(from);