Beispiel #1
0
        public BarterGump(BarterVendor vendor, Mobile client, byte vendorItemPage, byte clientItemPage) : base(10, 10)
        {
            _children = new List <Gump>();
            _client   = client;
            _vendor   = vendor;

            _clientPage = Math.Max(clientItemPage, (byte)1);
            _vendorPage = Math.Max(vendorItemPage, (byte)1);

            AddPage(1);

            //vendor goods
            AddBackground(0, 0, 240, 320, 9250);
            AddLabel(20, 15, LabelHue, "Vendor Goods");

            _vendorItems = vendor.BankBox.Items;
            int rangeIdx = ((_vendorPage * 10) - 10);

            AddItemRange(20, 40, 1, _vendorItems.GetRange(rangeIdx, Math.Min((_vendorItems.Count - rangeIdx), 10)));

            if (_vendorPage > 1)
            {
                AddButton(190, 15, 9766, 9767, GetButtonId(0, 0), GumpButtonType.Reply, 0);
            }

            if (_vendorItems.Count > (rangeIdx + 10))
            {
                AddButton(210, 15, 9762, 9763, GetButtonId(0, 1), GumpButtonType.Reply, 0);
            }

            //client goods
            AddBackground(510, 0, 240, 320, 9250);
            AddLabel(530, 15, LabelHue, "Your Goods");

            _clientItems = client.Backpack.Items;
            rangeIdx     = ((_clientPage * 10) - 10);

            AddItemRange(530, 40, 2, _clientItems.GetRange(rangeIdx, Math.Min((_clientItems.Count - rangeIdx), 10)));

            if (_clientPage > 1)
            {
                AddButton(700, 15, 9766, 9767, GetButtonId(0, 2), GumpButtonType.Reply, 0);
            }

            if (_clientItems.Count > (rangeIdx + 10))
            {
                AddButton(720, 15, 9762, 9763, GetButtonId(0, 3), GumpButtonType.Reply, 0);
            }
        }
Beispiel #2
0
		public BarterGump( BarterVendor vendor, Mobile client, byte vendorItemPage, byte clientItemPage ) : base( 10, 10 )
		{
			_children = new List<Gump>();
			_client = client;
			_vendor = vendor;

			_clientPage = Math.Max( clientItemPage, (byte)1 );
			_vendorPage = Math.Max( vendorItemPage, (byte)1 );

			AddPage( 1 );

			//vendor goods
			AddBackground( 0, 0, 240, 320, 9250 );
			AddLabel( 20, 15, LabelHue, "Vendor Goods" );

			_vendorItems = vendor.BankBox.Items;
			int rangeIdx = ((_vendorPage * 10) - 10);

			AddItemRange( 20, 40, 1, _vendorItems.GetRange( rangeIdx, Math.Min( (_vendorItems.Count - rangeIdx), 10 ) ) );

			if( _vendorPage > 1 )
				AddButton( 190, 15, 9766, 9767, GetButtonId( 0, 0 ), GumpButtonType.Reply, 0 );

			if( _vendorItems.Count > (rangeIdx + 10) )
				AddButton( 210, 15, 9762, 9763, GetButtonId( 0, 1 ), GumpButtonType.Reply, 0 );

			//client goods
			AddBackground( 510, 0, 240, 320, 9250 );
			AddLabel( 530, 15, LabelHue, "Your Goods" );

			_clientItems = client.Backpack.Items;
			rangeIdx = ((_clientPage * 10) - 10);

			AddItemRange( 530, 40, 2, _clientItems.GetRange( rangeIdx, Math.Min( (_clientItems.Count - rangeIdx), 10 ) ) );

			if( _clientPage > 1 )
				AddButton( 700, 15, 9766, 9767, GetButtonId( 0, 2 ), GumpButtonType.Reply, 0 );

			if( _clientItems.Count > (rangeIdx + 10) )
				AddButton( 720, 15, 9762, 9763, GetButtonId( 0, 3 ), GumpButtonType.Reply, 0 );
		}
Beispiel #3
0
 public BarterGump(BarterVendor vendor, Mobile client) : this(vendor, client, 1, 1)
 {
 }
Beispiel #4
0
		public BarterGump( BarterVendor vendor, Mobile client ) : this( vendor, client, 1, 1 ) { }