Server.Mobiles.BaseCreature.ChangeAIType C# (CSharp) Méthode

ChangeAIType() public méthode

public ChangeAIType ( AIType NewAI ) : void
NewAI AIType
Résultat void
        public void ChangeAIType( AIType NewAI )
        {
            if ( m_AI != null )
                m_AI.m_Timer.Stop();

            if( ForcedAI != null )
            {
                m_AI = ForcedAI;
                return;
            }

            m_AI = null;

            switch ( NewAI )
            {
                case AIType.AI_Melee:
                    m_AI = new MeleeAI(this);
                    break;
                case AIType.AI_Animal:
                    m_AI = new AnimalAI(this);
                    break;
                case AIType.AI_Berserk:
                    m_AI = new BerserkAI(this);
                    break;
                case AIType.AI_Archer:
                    m_AI = new ArcherAI(this);
                    break;
                case AIType.AI_Healer:
                    m_AI = new HealerAI(this);
                    break;
                case AIType.AI_Vendor:
                    m_AI = new VendorAI(this);
                    break;
                case AIType.AI_Mage:
                    m_AI = new MageAI(this);
                    break;
                case AIType.AI_Predator:
                    //m_AI = new PredatorAI(this);
                    m_AI = new MeleeAI(this);
                    break;
                case AIType.AI_Thief:
                    m_AI = new ThiefAI(this);
                    break;
            }
        }
BaseCreature