Esempio n. 1
0
		public ConfirmTentPlacementGump( Mobile owner, TentAddon tent, TentFlap flap, TentBedroll roll, SecureTentChest chest, Rectangle2D bounds )
			: base( 10, 10 )
		{
			m_Owner = owner;
			m_Tent = tent;
			m_Flap = flap;
			m_Bedroll = roll;
			m_Chest = chest;
			m_RegionBounds = bounds;

			Closable = false;
			Disposable = false;
			Resizable = false;
			Dragable = true;

			AddPage( 1 );
			AddBackground( 10, 10, 325, 305, 9250 );
			AddImageTiled( 25, 25, 295, 11, 50 );
			AddLabel( 90, 35, 0, "Confirm Tent Placement" );

			AddButton( 35, 275, 4020, 4022, 0, GumpButtonType.Reply, 1 ); //Cancel
			AddButton( 280, 275, 4023, 4025, 1, GumpButtonType.Reply, 1 ); //Ok

			AddHtml( 27, 75, 290, 200, String.Format( "<center>You are about to place a travel tent.</center><br> Within, you will find a bedroll "
													 + "and a secure wooden chest.<br> To repack your tent, or to logout safely, double-click "
													 + "your bedroll. When doing so, please make sure that all items are removed from the chest."
													 + "<br> Please press okay to continue, or press cancel to stop tent placement." ), false, false );
		}
Esempio n. 2
0
        public TentFlapFriendTarget(bool add, TentFlap flap)
            : base(12, false, TargetFlags.None)
        {
            CheckLOS = false;

            m_Flap  = flap;
            m_toAdd = add;
        }
Esempio n. 3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            m_Owner = (Mobile)reader.ReadMobile();
            m_Tent  = (TentAddon)reader.ReadItem();
            m_Flap  = (TentFlap)reader.ReadItem();
            m_Chest = (SecureTentChest)reader.ReadItem();
        }
Esempio n. 4
0
        public TentBedroll(Mobile owner, TentAddon tent, TentFlap flap, SecureTentChest chest)
            : base(0xA55)
        {
            Name    = "a bedroll";
            Movable = false;

            m_Owner = owner;
            m_Tent  = tent;
            m_Flap  = flap;
            m_Chest = chest;
        }
Esempio n. 5
0
		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			m_Owner = (Mobile)reader.ReadMobile();
			m_Tent = (TentAddon)reader.ReadItem();
			m_Flap = (TentFlap)reader.ReadItem();
			m_Chest = (SecureTentChest)reader.ReadItem();
		}
Esempio n. 6
0
		public TentBedroll( Mobile owner, TentAddon tent, TentFlap flap, SecureTentChest chest )
			: base( 0xA55 )
		{
			Name = "a bedroll";
			Movable = false;

			m_Owner = owner;
			m_Tent = tent;
			m_Flap = flap;
			m_Chest = chest;
		}
Esempio n. 7
0
		public override void OnDoubleClick( Mobile from )
		{
			Point2D start = new Point2D( from.X - 3, from.Y - 3 );
			Point2D end = new Point2D( from.X + 3, from.Y + 3 );

			m_Bounds = new Rectangle2D( start, end );

			if( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); //That must be in your pack to use it.
			}
			else if( AlreadyOwnTent( from ) )
			{
				from.SendMessage( "You already have a tent established." );
			}
			else if( from.HasGump( typeof( ConfirmTentPlacementGump ) ) )
			{
				from.CloseGump( typeof( ConfirmTentPlacementGump ) );
			}
			else if( from.Combatant != null )
			{
				from.SendMessage( "You can't place a tent while fighting!" );
			}
			else if( VerifyPlacement( from, m_Bounds ) )
			{
				TentAddon tent = new TentAddon();
				tent.MoveToWorld( new Point3D( from.X, from.Y, from.Z ), from.Map );

				TentFlap flap = new TentFlap( from, this );
				flap.MoveToWorld( new Point3D( from.X + 2, from.Y, from.Z ), from.Map );

				SecureTentChest chest = new SecureTentChest( from );
				chest.MoveToWorld( new Point3D( from.X - 1, from.Y - 2, from.Z ), from.Map );

				TentBedroll roll = new TentBedroll( from, tent, flap, chest );
				roll.MoveToWorld( new Point3D( from.X, from.Y + 1, from.Z ), from.Map );

				from.SendGump( new ConfirmTentPlacementGump( from, tent, flap, roll, chest, m_Bounds ) );

				this.Delete();
			}
			else
			{
				from.SendMessage( "You cannot place a tent in this area." );
			}
		}
Esempio n. 8
0
        public override void OnDoubleClick(Mobile from)
        {
            Point2D start = new Point2D(from.X - 3, from.Y - 3);
            Point2D end   = new Point2D(from.X + 3, from.Y + 3);

            m_Bounds = new Rectangle2D(start, end);

            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);                   //That must be in your pack to use it.
            }
            else if (AlreadyOwnTent(from))
            {
                from.SendMessage("You already have a tent established.");
            }
            else if (from.HasGump(typeof(ConfirmTentPlacementGump)))
            {
                from.CloseGump(typeof(ConfirmTentPlacementGump));
            }
            else if (from.Combatant != null)
            {
                from.SendMessage("You can't place a tent while fighting!");
            }
            else if (VerifyPlacement(from, m_Bounds))
            {
                TentAddon tent = new TentAddon();
                tent.MoveToWorld(new Point3D(from.X, from.Y, from.Z), from.Map);

                TentFlap flap = new TentFlap(from, this);
                flap.MoveToWorld(new Point3D(from.X + 2, from.Y, from.Z), from.Map);

                SecureTentChest chest = new SecureTentChest(from);
                chest.MoveToWorld(new Point3D(from.X - 1, from.Y - 2, from.Z), from.Map);

                TentBedroll roll = new TentBedroll(from, tent, flap, chest);
                roll.MoveToWorld(new Point3D(from.X, from.Y + 1, from.Z), from.Map);

                from.SendGump(new ConfirmTentPlacementGump(from, tent, flap, roll, chest, m_Bounds));

                this.Delete();
            }
            else
            {
                from.SendMessage("You cannot place a tent in this area.");
            }
        }
Esempio n. 9
0
		public TentFlapFriendTarget( bool add, TentFlap flap )
			: base( 12, false, TargetFlags.None )
		{
			CheckLOS = false;

			m_Flap = flap;
			m_toAdd = add;
		}
Esempio n. 10
0
			public FlapTimer( TentFlap flap )
				: base( TimeSpan.FromSeconds( 5 ) )
			{
				m_Flap = flap;
				Priority = TimerPriority.TwoFiftyMS;
			}
Esempio n. 11
0
 public FlapTimer(TentFlap flap)
     : base(TimeSpan.FromSeconds(5))
 {
     m_Flap   = flap;
     Priority = TimerPriority.TwoFiftyMS;
 }