Index: Scripts/Engines/AI/AI/BaseAI.cs
===================================================================
--- Scripts/Engines/AI/AI/BaseAI.cs (revision 370)
+++ Scripts/Engines/AI/AI/BaseAI.cs (revision 371)
@@ -1051,8 +1051,8 @@
case OrderType.Friend:
case OrderType.Unfriend:
m_Mobile.ControlMaster.RevealingAction();
+ break;
- break;
case OrderType.Guard:
m_Mobile.ControlMaster.RevealingAction();
m_Mobile.CurrentSpeed = m_Mobile.ActiveSpeed;
@@ -2392,8 +2392,11 @@
}
else if( m_Mobile.Controlled )
{
- if( m_Mobile.ControlTarget == null || m_Mobile.ControlTarget.Deleted || !m_Mobile.ControlTarget.Alive || m_Mobile.ControlTarget.IsDeadBondedPet || !m_Mobile.InRange( m_Mobile.ControlTarget, m_Mobile.RangePerception * 2 ) )
+ if( m_Mobile.ControlTarget == null || m_Mobile.ControlTarget.Deleted || m_Mobile.ControlTarget.Hidden || !m_Mobile.ControlTarget.Alive || m_Mobile.ControlTarget.IsDeadBondedPet || !m_Mobile.InRange( m_Mobile.ControlTarget, m_Mobile.RangePerception * 2 ) )
{
+ if ( m_Mobile.ControlTarget != null && m_Mobile.ControlTarget != m_Mobile.ControlMaster )
+ m_Mobile.ControlTarget = null;
+
m_Mobile.FocusMob = null;
return false;
}
Index: Scripts/Engines/AI/Creature/BaseCreature.cs
===================================================================
--- Scripts/Engines/AI/Creature/BaseCreature.cs (revision 370)
+++ Scripts/Engines/AI/Creature/BaseCreature.cs (revision 371)
@@ -1683,7 +1683,7 @@
else if ( version < 13 && m_ControlOrder >= OrderType.Unfriend )
++m_ControlOrder;
- if ( version < 16 )
+ if ( version < 16 && Loyalty != MaxLoyalty )
Loyalty *= 10;
double activeSpeed = m_dActiveSpeed;
@@ -4180,7 +4180,7 @@
rights[0].m_Damage = (int)(rights[0].m_Damage * 1.25); //This would be the first valid person attacking it. Gets a 25% bonus. Per 1/19/07 Five on Friday
if ( rights.Count > 1 )
- rights.Sort(); //Sort by damage
+ rights.Sort(); //Sort by damage
int topDamage = rights[0].m_Damage;