using System;
using System.Xml;
using Server;
using Server.Mobiles;

namespace Server.Regions
{
    public class BusinessRegion : GuardedRegion
    {
        public BusinessRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
        {
        }

        public override void OnEnter( Mobile m )
        {
            base.OnEnter( m );
            if ( m != null && m.Player )
            {
                m.SendMessage( "Welcome to <BASEFONT COLOR='#FFD700'>{0}</BASEFONT>", this.Name );
            }
            if ( m != null && m.Player )
            {
                Server.Commands.StableMountCommand.ForceDismountAndStore((PlayerMobile)m);
            }
        }

        public override void OnExit( Mobile m )
        {
            base.OnExit( m );
            if ( m != null && m.Player )
            {
                Server.Commands.RetrieveMountCommand.AutoRemountPlayer((PlayerMobile)m);
            }
        }
    }
}
