fix: Fixes punching while pacified (#2332)
This commit is contained in:
parent
10f26c387e
commit
d625ea5ba4
2 changed files with 9 additions and 6 deletions
|
|
@ -444,7 +444,7 @@ public abstract partial class BaseAI
|
||||||
DebugSay("No threats found. Going home...");
|
DebugSay("No threats found. Going home...");
|
||||||
Action = ActionType.Wander;
|
Action = ActionType.Wander;
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugSay("I stopped being on guard.");
|
DebugSay("I stopped being on guard.");
|
||||||
Action = ActionType.Wander;
|
Action = ActionType.Wander;
|
||||||
|
|
||||||
|
|
@ -600,6 +600,11 @@ public abstract partial class BaseAI
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Mobile.BardPacified)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (HandleBardProvoked() || HandleControlled() || HandleConstantFocus())
|
if (HandleBardProvoked() || HandleControlled() || HandleConstantFocus())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -2765,7 +2765,7 @@ namespace Server.Mobiles
|
||||||
|
|
||||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
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) &&
|
if (InRange(m.Location, AcquireOnApproachRange) && !InRange(oldLocation, AcquireOnApproachRange) &&
|
||||||
CanBeHarmful(m) && IsEnemy(m))
|
CanBeHarmful(m) && IsEnemy(m))
|
||||||
|
|
@ -2780,13 +2780,11 @@ namespace Server.Mobiles
|
||||||
ForceReacquire();
|
ForceReacquire();
|
||||||
}
|
}
|
||||||
|
|
||||||
var speechType = SpeechType;
|
SpeechType?.OnMovement(this, m, oldLocation);
|
||||||
|
|
||||||
speechType?.OnMovement(this, m, oldLocation);
|
|
||||||
|
|
||||||
/* Begin notice sound */
|
/* Begin notice sound */
|
||||||
if ((!m.Hidden || m.AccessLevel == AccessLevel.Player) && m.Player && FightMode != FightMode.Aggressor &&
|
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))
|
InRange(m.Location, 18) && !InRange(oldLocation, 18))
|
||||||
{
|
{
|
||||||
if (Body.IsMonster)
|
if (Body.IsMonster)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue