diff --git a/Projects/UOContent/Mobiles/AI/AnimalAI.cs b/Projects/UOContent/Mobiles/AI/AnimalAI.cs index 9e33414c7..a25355078 100644 --- a/Projects/UOContent/Mobiles/AI/AnimalAI.cs +++ b/Projects/UOContent/Mobiles/AI/AnimalAI.cs @@ -46,6 +46,14 @@ public class AnimalAI : BaseAI { var combatant = Mobile.Combatant; + if (Mobile.Controlled && combatant == Mobile) + { + DebugSay("I should not attack myself!"); + Mobile.Combatant = null; + Action = ActionType.Guard; + return true; + } + if (combatant == null || combatant.Deleted || combatant.Map != Mobile.Map || !combatant.Alive || combatant.IsDeadBondedPet) { diff --git a/Projects/UOContent/Mobiles/AI/MageAI.cs b/Projects/UOContent/Mobiles/AI/MageAI.cs index 03fe60a6a..c1e6b70f4 100644 --- a/Projects/UOContent/Mobiles/AI/MageAI.cs +++ b/Projects/UOContent/Mobiles/AI/MageAI.cs @@ -624,6 +624,14 @@ public class MageAI : BaseAI var c = Mobile.Combatant; Mobile.Warmode = true; + if (Mobile.Controlled && c == Mobile) + { + DebugSay("I should not attack myself!"); + Mobile.Combatant = null; + Action = ActionType.Guard; + return true; + } + if (c?.Deleted != false || !c.Alive || c.IsDeadBondedPet || !Mobile.CanSee(c) || !Mobile.CanBeHarmful(c, false) || c.Map != Mobile.Map) { diff --git a/Projects/UOContent/Mobiles/AI/MeleeAI.cs b/Projects/UOContent/Mobiles/AI/MeleeAI.cs index edf0b108e..44fe40370 100644 --- a/Projects/UOContent/Mobiles/AI/MeleeAI.cs +++ b/Projects/UOContent/Mobiles/AI/MeleeAI.cs @@ -33,6 +33,14 @@ public class MeleeAI : BaseAI { var combatant = Mobile.Combatant; + if (Mobile.Controlled && combatant == Mobile) + { + DebugSay("I should not attack myself!"); + Mobile.Combatant = null; + Action = ActionType.Guard; + return true; + } + if (combatant == null || combatant.Deleted || combatant.Map != Mobile.Map || !combatant.Alive || combatant.IsDeadBondedPet) {