Server.Mobiles.BaseCreature.AggressiveAction C# (CSharp) Method

AggressiveAction() public method

public AggressiveAction ( Server.Mobile aggressor, bool criminal ) : void
aggressor Server.Mobile
criminal bool
return void
        public override void AggressiveAction( Mobile aggressor, bool criminal )
        {
            base.AggressiveAction( aggressor, criminal );

            if ( this.ControlMaster != null )
                if ( NotorietyHandlers.CheckAggressor( this.ControlMaster.Aggressors, aggressor ) )
                    aggressor.Aggressors.Add( AggressorInfo.Create( this, aggressor, true ) );

            OrderType ct = m_ControlOrder;

            if ( m_AI != null )
            {
                if( !Core.ML || ( ct != OrderType.Follow && ct != OrderType.Stop && ct != OrderType.Stay ) )
                {
                    m_AI.OnAggressiveAction( aggressor );
                }
                else
                {
                    DebugSay( "I'm being attacked but my master told me not to fight." );
                    Warmode = false;
                    return;
                }
            }

            StopFlee();

            ForceReacquire();

            if ( !IsEnemy( aggressor ) )
            {
                Ethics.Player pl = Ethics.Player.Find( aggressor, true );

                if ( pl != null && pl.IsShielded )
                    pl.FinishShield();
            }

            if ( aggressor.ChangingCombatant && (m_bControlled || m_bSummoned) && (ct == OrderType.Come || ( !Core.ML && ct == OrderType.Stay ) || ct == OrderType.Stop || ct == OrderType.None || ct == OrderType.Follow) )
            {
                ControlTarget = aggressor;
                ControlOrder = OrderType.Attack;
            }
            else if ( Combatant == null && !m_bBardPacified )
            {
                Warmode = true;
                Combatant = aggressor;
            }
        }
BaseCreature