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

GetDefenseSpellRandom() public method

public GetDefenseSpellRandom ( ) : Spell
return Spell
        public Spell GetDefenseSpellRandom()
        {
            if ( m_arSpellDefense.Count > 0 )
            {
                Type type = m_arSpellDefense[Utility.Random(m_arSpellDefense.Count)];

                object[] args = {this, null};
                return Activator.CreateInstance( type, args ) as Spell;
            }
            else
            {
                return null;
            }
        }
BaseCreature