Server.Regions.HouseRegion.OnMoveInto C# (CSharp) Method

OnMoveInto() public method

public OnMoveInto ( Server.Mobile from, Direction d, Server.Point3D newLocation, Server.Point3D oldLocation ) : bool
from Server.Mobile
d Direction
newLocation Server.Point3D
oldLocation Server.Point3D
return bool
		public override bool OnMoveInto( Mobile from, Direction d, Point3D newLocation, Point3D oldLocation )
		{
			if ( !base.OnMoveInto( from, d, newLocation, oldLocation ) )
				return false;

			if ( from is BaseCreature && ((BaseCreature)from).NoHouseRestrictions )
			{
			}
			else if ( from is BaseCreature && !((BaseCreature)from).Controlled ) // Untamed creatures cannot enter public houses
			{
				return false;
			}
			else if ( from is BaseCreature && ((BaseCreature)from).IsHouseSummonable && !(BaseCreature.Summoning || m_House.IsInside( oldLocation, 16 )) )
			{
				return false;
			}
			else if ( m_House.Public && m_House.IsBanned( from ) && m_House.IsInside( newLocation, 16 ) )
			{
				from.Location = m_House.BanLocation;
				from.SendLocalizedMessage( 501284 ); // You may not enter.
				return false;
			}

			return true;
		}