Server.Multis.BaseHouse.CheckTransferPosition C# (CSharp) Méthode

CheckTransferPosition() public méthode

public CheckTransferPosition ( Server.Mobile from, Server.Mobile to ) : bool
from Server.Mobile
to Server.Mobile
Résultat bool
        public bool CheckTransferPosition( Mobile from, Mobile to )
		{
			bool isValid = true;
			Item sign = m_Sign;
			Point3D p = ( sign == null ? Point3D.Zero : sign.GetWorldLocation() );

			if ( from.Map != Map || to.Map != Map )
				isValid = false;
			else if ( sign == null )
				isValid = false;
			else if ( from.Map != sign.Map || to.Map != sign.Map )
				isValid = false;
			else if ( IsInside( from ) )
				isValid = false;
			else if ( IsInside( to ) )
				isValid = false;
			else if ( !from.InRange( p, 2 ) )
				isValid = false;
			else if ( !to.InRange( p, 2 ) )
				isValid = false;

			if ( !isValid )
				from.SendLocalizedMessage( 1062067 ); // In order to transfer the house, you and the recipient must both be outside the building and within two paces of the house sign.

			return isValid;
		}