fix: Fixes punching while pacified (#2332)

This commit is contained in:
Kamron Batman 2026-02-09 14:35:07 -08:00 committed by GitHub
parent 10f26c387e
commit d625ea5ba4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 6 deletions

View file

@ -444,7 +444,7 @@ public abstract partial class BaseAI
DebugSay("No threats found. Going home...");
Action = ActionType.Wander;
}
DebugSay("I stopped being on guard.");
Action = ActionType.Wander;
@ -600,6 +600,11 @@ public abstract partial class BaseAI
return false;
}
if (Mobile.BardPacified)
{
return false;
}
if (HandleBardProvoked() || HandleControlled() || HandleConstantFocus())
{
return true;

View file

@ -2765,7 +2765,7 @@ namespace Server.Mobiles
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (AcquireOnApproach && !Controlled && !Summoned && FightMode != FightMode.Aggressor)
if (AcquireOnApproach && !Controlled && !Summoned && !BardPacified && FightMode != FightMode.Aggressor)
{
if (InRange(m.Location, AcquireOnApproachRange) && !InRange(oldLocation, AcquireOnApproachRange) &&
CanBeHarmful(m) && IsEnemy(m))
@ -2780,13 +2780,11 @@ namespace Server.Mobiles
ForceReacquire();
}
var speechType = SpeechType;
speechType?.OnMovement(this, m, oldLocation);
SpeechType?.OnMovement(this, m, oldLocation);
/* Begin notice sound */
if ((!m.Hidden || m.AccessLevel == AccessLevel.Player) && m.Player && FightMode != FightMode.Aggressor &&
FightMode != FightMode.None && Combatant == null && !Controlled && !Summoned &&
FightMode != FightMode.None && Combatant == null && !Controlled && !Summoned && !BardPacified &&
InRange(m.Location, 18) && !InRange(oldLocation, 18))
{
if (Body.IsMonster)