diff --git a/Projects/UOContent/Mobiles/AI/AnimalAI.cs b/Projects/UOContent/Mobiles/AI/AnimalAI.cs index a25355078..9e33414c7 100644 --- a/Projects/UOContent/Mobiles/AI/AnimalAI.cs +++ b/Projects/UOContent/Mobiles/AI/AnimalAI.cs @@ -46,14 +46,6 @@ 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 c1e6b70f4..9ed02cd02 100644 --- a/Projects/UOContent/Mobiles/AI/MageAI.cs +++ b/Projects/UOContent/Mobiles/AI/MageAI.cs @@ -624,14 +624,6 @@ 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) { @@ -721,6 +713,14 @@ public class MageAI : BaseAI } else if (Mobile.Spell == null && Core.TickCount - _nextCastTime >= 0) { + if (Mobile.Controlled && c == Mobile) + { + DebugSay("I should not attack myself!"); + Mobile.Combatant = null; + Action = ActionType.Guard; + return true; + } + // We are ready to cast a spell Spell spell; var toDispel = FindDispelTarget(true); diff --git a/Projects/UOContent/Mobiles/AI/MeleeAI.cs b/Projects/UOContent/Mobiles/AI/MeleeAI.cs index 44fe40370..edf0b108e 100644 --- a/Projects/UOContent/Mobiles/AI/MeleeAI.cs +++ b/Projects/UOContent/Mobiles/AI/MeleeAI.cs @@ -33,14 +33,6 @@ 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) {