Esempio n. 1
0
        public bool CheckTeleport(Mobile to)
        {
            if (Deleted || !IsOwner(to) || House == null || this.Map == Map.Internal)
            {
                return(false);
            }

            if (House.IsInside(to) || to.Map != House.Map || !House.InRange(to, 5))
            {
                return(false);
            }

            if (Placeholder == null)
            {
                Placeholder = new PlayerVendorPlaceholder(this);
                Placeholder.MoveToWorld(this.Location, this.Map);

                this.MoveToWorld(to.Location, to.Map);

                to.SendLocalizedMessage(1062431);                   // This vendor has been moved out of the house to your current location temporarily.  The vendor will return home automatically after two minutes have passed once you are done managing its inventory or customizing it.
            }
            else
            {
                Placeholder.RestartTimer();

                to.SendLocalizedMessage(1062430);                   // This vendor is currently temporarily in a location outside its house.  The vendor will return home automatically after two minutes have passed once you are done managing its inventory or customizing it.
            }

            return(true);
        }
			public ExpireTimer( PlayerVendorPlaceholder placeholder ) : base( TimeSpan.FromMinutes( 2.0 ) )
			{
				m_Placeholder = placeholder;

				Priority = TimerPriority.FiveSeconds;
			}
		public bool CheckTeleport( Mobile to )
		{
			if ( Deleted || !IsOwner( to ) || House == null || this.Map == Map.Internal )
				return false;

			if ( House.IsInside( to ) || to.Map != House.Map || !House.InRange( to, 5 ) )
				return false;

			if ( Placeholder == null )
			{
				Placeholder = new PlayerVendorPlaceholder( this );
				Placeholder.MoveToWorld( this.Location, this.Map );

				this.MoveToWorld( to.Location, to.Map );

				to.SendLocalizedMessage( 1062431 ); // This vendor has been moved out of the house to your current location temporarily.  The vendor will return home automatically after two minutes have passed once you are done managing its inventory or customizing it.
			}
			else
			{
				Placeholder.RestartTimer();

				to.SendLocalizedMessage( 1062430 ); // This vendor is currently temporarily in a location outside its house.  The vendor will return home automatically after two minutes have passed once you are done managing its inventory or customizing it.
			}

			return true;
		}
Esempio n. 4
0
 public ExpireTimer(PlayerVendorPlaceholder placeholder)
     : base(TimeSpan.FromMinutes(2.0))
 {
     m_Placeholder = placeholder;
 }
Esempio n. 5
0
 public ExpireTimer( PlayerVendorPlaceholder placeholder )
     : base(TimeSpan.FromMinutes( 2.0 ))
 {
     m_Placeholder = placeholder;
 }