Пример #1
0
        public override bool OnBeginSpellCast(Mobile m, ISpell s)
        {
            if (!IsDisabled() && !s.OnCastInTown(this))
            {
                m.SendLocalizedMessage(500946);                   // You cannot cast this in town!
                return(false);
            }

            return(base.OnBeginSpellCast(m, s));
        }
Пример #2
0
		public override bool OnBeginSpellCast( Mobile m, ISpell s )
		{
			if ( !s.OnCastInTown( this ) )
			{
				m.SendLocalizedMessage( 500946 ); // You cannot cast this in town!
				
				return false;
			}
			
			return base.OnBeginSpellCast( m, s );
		}
            public override bool OnBeginSpellCast(Mobile from, ISpell s)
            {
                if (!s.OnCastInTown(this) || s is TeleportSpell || s is MassDispelSpell || s is Server.Spells.Chivalry.DispelEvilSpell || s is MassCurseSpell || s is DispelSpell || s is FireFieldSpell || s is PoisonFieldSpell || s is WallOfStoneSpell || s is DispelFieldSpell || s is ParalyzeFieldSpell || s is EnergyFieldSpell )
                {
                    from.SendMessage("You cannot cast that spell here.");
                    return false;
                }

                return base.OnBeginSpellCast(from, s);
            }
Пример #4
0
        public override bool OnBeginSpellCast( Mobile m, ISpell s )
        {
            if ( !IsDisabled() && !s.OnCastInTown( this ) )
            {
                //m.SendLocalizedMessage( 500946 ); // You cannot cast this in town!
                m.SendAsciiMessage("You cannot cast this in town!");
                return false;
            }

            return base.OnBeginSpellCast( m, s );
        }