public override void OnDoubleClick(Mobile m)
        {
            if (!m.InRange(this, 2))
            {
                m.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045);                   // I can't reach that.
                return;
            }

            if (RaisableItem != null && RaisableItem.Deleted)
            {
                RaisableItem = null;
            }

            Flip();

            if (RaisableItem != null)
            {
                if (RaisableItem.IsRaisable)
                {
                    RaisableItem.Raise();
                    m.LocalOverheadMessage(MessageType.Regular, 0x5A, true, "You hear a grinding noise echoing in the distance.");
                }
                else
                {
                    m.LocalOverheadMessage(MessageType.Regular, 0x5A, true, "You flip the switch again, but nothing happens.");
                }
            }
        }
Пример #2
0
		public override void OnDoubleClick( Mobile m )
		{
			if ( !m.InRange( this, 2 ) )
			{
				m.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
				return;
			}

			if ( RaisableItem != null && RaisableItem.Deleted )
				RaisableItem = null;

			Flip();

			if ( RaisableItem != null )
			{
				if ( RaisableItem.IsRaisable )
				{
					RaisableItem.Raise();
					m.LocalOverheadMessage( MessageType.Regular, 0x5A, true, "You hear a grinding noise echoing in the distance." );
				}
				else
				{
					m.LocalOverheadMessage( MessageType.Regular, 0x5A, true, "You flip the switch again, but nothing happens." );
				}
			}
		}
Пример #3
0
		public override void Execute( CommandEventArgs args, object o )
		{
			if( o is Item && !(o is AddonComponent) && !(o is BaseAddon) )
			{
				Item i = (Item)o;
				RaisableItem newItem = new RaisableItem( i.ItemID );

				newItem.Hue = i.Hue;
				newItem.Light = i.Light;
				newItem.Movable = false;
				newItem.Name = i.Name;

				newItem.MoveToWorld( i.Location, i.Map );

				if( i.Parent == args.Mobile )
					newItem.Bounce( args.Mobile );

				if( i is Container )
					((Container)i).Destroy();
				else
					i.Delete();

				AddResponse( "The item has been converted to a raisable item." );
			}
			else
			{
				LogFailure( "This command only works with basic items (no addons)." );
			}
		}
Пример #4
0
 public RaiseTimer(RaisableItem item)
     : base(TimeSpan.Zero, TimeSpan.FromSeconds(0.5))
 {
     m_Item      = item;
     m_CloseTime = DateTime.UtcNow + item.CloseDelay;
     m_Up        = true;
 }
Пример #5
0
			public RaiseTimer( RaisableItem item ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.5 ) )
			{
				m_Item = item;
				m_CloseTime = DateTime.Now + item.CloseDelay;
				m_Up = true;

				Priority = TimerPriority.TenMS;
			}
Пример #6
0
            public RaiseTimer(RaisableItem item) : base(TimeSpan.Zero, TimeSpan.FromSeconds(0.5))
            {
                m_Item      = item;
                m_CloseTime = DateTime.Now + item.CloseDelay;
                m_Up        = true;

                Priority = TimerPriority.TenMS;
            }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            m_RaisableItem = (RaisableItem)reader.ReadItem();

            Reset();
        }
Пример #8
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            this.m_RaisableItem = (RaisableItem)reader.ReadItem();

            this.Reset();
        }
Пример #9
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            switch (version)
            {
            case 1:
            {
                m_NormalID   = reader.ReadInt();
                m_SwitchedID = reader.ReadInt();

                goto case 0;
            }

            case 0:
            {
                m_RaisableItem = (RaisableItem)reader.ReadItem();
            } break;
            }

            Reset();
        }
Пример #10
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadEncodedInt();

			switch( version )
			{
				case 1:
					{
						m_NormalID = reader.ReadInt();
						m_SwitchedID = reader.ReadInt();

						goto case 0;
					}
				case 0:
					{
						m_RaisableItem = (RaisableItem)reader.ReadItem();
					} break;
			}

			Reset();
		}