50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using System;
|
|
using System.Xml;
|
|
using Server;
|
|
using Server.Mobiles;
|
|
|
|
namespace Server.Regions
|
|
{
|
|
public class InnRegion : Region
|
|
{
|
|
public InnRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
|
|
{
|
|
}
|
|
|
|
public InnRegion( string name, Map map, int priority, params Rectangle3D[] area ) : base( name, map, priority, area )
|
|
{
|
|
}
|
|
|
|
public override TimeSpan GetLogoutDelay( Mobile m )
|
|
{
|
|
return TimeSpan.Zero;
|
|
}
|
|
|
|
public override bool AllowHousing( Mobile from, Point3D p )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
public override void OnEnter( Mobile m )
|
|
{
|
|
base.OnEnter( m );
|
|
if ( m != null && m.Player )
|
|
{
|
|
Server.Commands.StableMountCommand.ForceDismountAndStore((PlayerMobile)m);
|
|
}
|
|
if ( m != null && m.Player )
|
|
{
|
|
m.SendMessage( "Welcome to <BASEFONT COLOR='#FFD700'>{0}</BASEFONT>", this.Name );
|
|
}
|
|
}
|
|
|
|
public override void OnExit( Mobile m )
|
|
{
|
|
base.OnExit( m );
|
|
if ( m != null && m.Player )
|
|
{
|
|
Server.Commands.RetrieveMountCommand.AutoRemountPlayer((PlayerMobile)m);
|
|
}
|
|
}
|
|
}
|
|
}
|