当前位置: 首页>>代码示例>>C#>>正文


C# Mobiles.PlayerVendor类代码示例

本文整理汇总了C#中Server.Mobiles.PlayerVendor的典型用法代码示例。如果您正苦于以下问题:C# PlayerVendor类的具体用法?C# PlayerVendor怎么用?C# PlayerVendor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PlayerVendor类属于Server.Mobiles命名空间,在下文中一共展示了PlayerVendor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PlayerVendorBuyGump

		public PlayerVendorBuyGump(PlayerVendor vendor, VendorItem vi)
			: base(100, 200)
		{
			m_Vendor = vendor;
			m_VI = vi;

			AddBackground(100, 10, 300, 150, 5054);

			AddHtmlLocalized(125, 20, 250, 24, 1019070, false, false); // You have agreed to purchase:

			if (!String.IsNullOrEmpty(vi.Description))
			{
				AddLabel(125, 45, 0, vi.Description);
			}
			else
			{
				AddHtmlLocalized(125, 45, 250, 24, 1019072, false, false); // an item without a description
			}

			AddHtmlLocalized(125, 70, 250, 24, 1019071, false, false); // for the amount of:
			AddLabel(125, 95, 0, vi.Price.ToString("#,0"));

			AddButton(250, 130, 4005, 4007, 0, GumpButtonType.Reply, 0);
			AddHtmlLocalized(282, 130, 100, 24, 1011012, false, false); // CANCEL

			AddButton(120, 130, 4005, 4007, 1, GumpButtonType.Reply, 0);
			AddHtmlLocalized(152, 130, 100, 24, 1011036, false, false); // OKAY
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:28,代码来源:PlayerVendorGumps.cs

示例2: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if ( !IsChildOf( from.Backpack ) )
            {
                from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
            }
            else if ( from.AccessLevel >= AccessLevel.GameMaster )
            {
                from.SendLocalizedMessage( 503248 );//Your godly powers allow you to place this vendor whereever you wish.

                Mobile v = new PlayerVendor( from );
                v.Location = from.Location;
                v.Direction = from.Direction & Direction.Mask;
                v.Map = from.Map;
                v.SayTo( from, 503246 ); // Ah! it feels good to be working again.

                this.Delete();
            }
            else
            {
                BaseHouse house = BaseHouse.FindHouseAt( from );
                if ( house == null && from.Region is HouseRegion )
                {
                    //allow placement in tents
                    house = ((HouseRegion)from.Region).House;
                    if ( house != null && !(house is Tent) )
                        house = null;
                }

                if ( house == null )
                {
                    from.SendLocalizedMessage( 503240 );//Vendors can only be placed in houses.
                }
                else if ( !house.IsOwner( from ) )
                {
                    from.SendLocalizedMessage( 503242 ); // You must ask the owner of this house to make you a friend in order to place this vendor here,
                }
                else
                {
                    IPooledEnumerable eable = from.GetMobilesInRange( 0 );
                    foreach ( Mobile m in eable )
                    {
                        if ( !m.Player )
                        {
                            from.SendAsciiMessage( "There is something blocking that location." );
                            eable.Free();
                            return;
                        }
                    }

                    Mobile v = new PlayerVendor( from );
                    v.Location = from.Location;
                    v.Direction = from.Direction & Direction.Mask;
                    v.Map = from.Map;
                    v.SayTo( from, 503246 ); // Ah! it feels good to be working again.

                    this.Delete();
                }
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:60,代码来源:PlayerVendorDeed.cs

示例3: PlayerVendorBuyGump

        public PlayerVendorBuyGump( Item i, PlayerVendor vend, VendorItem vi )
            : base(100, 200)
        {
            m_Item = i;
            m_Vendor = vend;
            m_VI = vi;

            string desc = m_VI.Description;

            if ( desc != null && (desc = desc.Trim()).Length == 0 )
                desc = null;

            AddPage( 0 );

            AddBackground( 100, 10, 300, 150, 5054 );

            AddHtmlLocalized( 125, 20, 250, 24, 1019070, false, false ); // You have agreed to purchase:

            if ( desc != null )
                AddLabel( 125, 45, 0, desc );
            else
                AddHtmlLocalized( 125, 45, 250, 24, 1019072, false, false ); // an item without a description

            AddHtmlLocalized( 125, 70, 250, 24, 1019071, false, false ); // for the amount of:
            AddLabel( 125, 95, 0, m_VI.Price.ToString() );

            AddButton( 250, 130, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 282, 130, 100, 24, 1011012, false, false ); // CANCEL

            AddButton( 120, 130, 4005, 4007, 2, GumpButtonType.Reply, 0 );
            AddHtmlLocalized( 152, 130, 100, 24, 1011036, false, false ); // OKAY
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:32,代码来源:PlayerVendorGumps.cs

示例4: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else if ( from.AccessLevel >= AccessLevel.GameMaster )
			{
				from.SendLocalizedMessage( 503248 ); // Your godly powers allow you to place this vendor whereever you wish.

				Mobile v = new PlayerVendor( from, BaseHouse.FindHouseAt( from ) );

				v.Direction = from.Direction & Direction.Mask;
				v.MoveToWorld( from.Location, from.Map );

				v.SayTo( from, 503246 ); // Ah! it feels good to be working again.

				this.Delete();
			}
			else
			{
				BaseHouse house = BaseHouse.FindHouseAt( from );

				if ( house == null )
				{
					from.SendLocalizedMessage( 503240 ); // Vendors can only be placed in houses.	
				}
				else if ( !house.IsFriend( from ) )
				{
					from.SendLocalizedMessage( 503242 ); // You must ask the owner of this building to name you a friend of the household in order to place a vendor here.
				}
				else if ( !house.Public ) 
				{
					from.SendLocalizedMessage( 503241 ); // You cannot place this vendor or barkeep.  Make sure the house is public and has sufficient storage available.
				}
				else
				{
					bool vendor;
					BaseHouse.IsThereVendor( from.Location, from.Map, out vendor );

					if ( vendor )
					{
						from.SendLocalizedMessage( 1062677 ); // You cannot place a vendor or barkeep at this location.
					}
					else
					{
						Mobile v = new PlayerVendor( from, house );

						v.Direction = from.Direction & Direction.Mask;
						v.MoveToWorld( from.Location, from.Map );

						v.SayTo( from, 503246 ); // Ah! it feels good to be working again.

						this.Delete();
					}
				}
			}
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:58,代码来源:PlayerVendorDeed.cs

示例5: VendorSearchItem

		public VendorSearchItem( Item item, int price, Func<bool> validCallback, PlayerVendor vendor, Container container, bool isContained )
		{
			m_Item = item;
			m_Price = price;
			m_ValidCallback = validCallback;
			m_Vendor = vendor;
			m_Container = container;
			m_IsContained = isContained;
		}
开发者ID:greeduomacro,项目名称:xrunuo,代码行数:9,代码来源:VendorSearchItem.cs

示例6: VendorItem

        public VendorItem(PlayerVendor vendor, Item item, int price, string description, DateTime created)
        {
            Vendor = vendor;
            this.m_Item = item;
            this.m_Price = price;

            if (description != null)
                this.m_Description = description;
            else
                this.m_Description = "";

            this.m_Created = created;

            this.m_Valid = true;
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:15,代码来源:PlayerVendor.cs

示例7: OnTarget

			protected override void OnTarget( Mobile from, object o )
			{
				PlayerVendorTile pvt = o as PlayerVendorTile;

				if ( o is PlayerVendorTile )
				{

					Mobile v = new PlayerVendor( from, BaseHouse.FindHouseAt( from ) );
					v.Location = pvt.Location;
					v.Direction = from.Direction & Direction.Mask;
					v.Map = pvt.Map;
					v.SayTo( from, 503246 );
					m_tcoe.Delete( );
					pvt.Delete( );
				}
				else
				{
					from.SendMessage( 33, "That is not a Player vendor Tile" );
				}
			}
开发者ID:Crome696,项目名称:ServUO,代码行数:20,代码来源:VendorTile.cs

示例8: VendorSearchMap

        public VendorSearchMap(PlayerVendor vendor, Item item) : base(vendor.Map)
        {
            Vendor = vendor;
            SearchItem = item;

            LootType = LootType.Blessed;

            Width = 400;
            Height = 400;

            Bounds = new Rectangle2D(vendor.X - 100, vendor.Y - 100, 200, 200);
            AddWorldPin(vendor.X, vendor.Y);

            if (vendor.Map == Map.Malas)
                Hue = 1102;
            else if (vendor.Map == Map.Trammel)
                Hue = 50;
            else if (vendor.Map == Map.Tokuno)
                Hue = 1154;

            DeleteTime = DateTime.UtcNow + TimeSpan.FromMinutes(30);
            Timer.DelayCall(TimeSpan.FromMinutes(30), Delete);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:23,代码来源:VendorSearchMap.cs

示例9: NewPlayerVendorCustomizeGump

		public NewPlayerVendorCustomizeGump( PlayerVendor vendor ) : base( 50, 50 )
		{
			m_Vendor = vendor;

			AddBackground( 0, 0, 370, 370, 0x13BE );

			AddImageTiled( 10, 10, 350, 20, 0xA40 );
			AddImageTiled( 10, 40, 350, 20, 0xA40 );
			AddImageTiled( 10, 70, 350, 260, 0xA40 );
			AddImageTiled( 10, 340, 350, 20, 0xA40 );

			AddAlphaRegion( 10, 10, 350, 350 );

			AddHtmlLocalized( 10, 12, 350, 18, 1011356, 0x7FFF, false, false ); // <center>VENDOR CUSTOMIZATION MENU</center>

			AddHtmlLocalized( 10, 42, 150, 18, 1062459, 0x421F, false, false ); // <CENTER>HAIR</CENTER>
			
			if ( vendor.Race == Race.Elf )
			{							
				// Remove Hair	
				AddButton( 10, 70 + m_FemaleElfHairStyles.Length * 20, 0xFB1, 0xFB3, 2, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 72 + m_FemaleElfHairStyles.Length * 20, 110, 18, 1011403, 0x7FFF, false, false ); // Remove
	
				// Color Hair
				AddButton( 10, 70 + (m_FemaleElfHairStyles.Length + 1) * 20, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 72 + (m_FemaleElfHairStyles.Length + 1) * 20, 110, 18, 1011402, 0x7FFF, false, false ); // Color
			
				if ( vendor.Female )
				{
					// Hair
					for ( int i = 0; i < m_FemaleElfHairStyles.Length; i++ )
					{
						HairOrBeard hair = m_FemaleElfHairStyles[i];
		
						AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 );
						AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false );
					}
				
					// Change gender
					AddButton( 160, 290, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
					AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x7FFF, false, false ); // Male
	
					AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x421F, false, false ); // Female
				}
				else
				{
					// Hair
					for ( int i = 0; i < m_MaleElfHairStyles.Length; i++ )
					{
						HairOrBeard hair = m_MaleElfHairStyles[i];
		
						AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 );
						AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false );
					}
					
					// Change gender
					AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x421F, false, false ); // Male
	
					AddButton( 160, 310, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
					AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x7FFF, false, false ); // Female
				}				
				
				// Change race
				AddButton( 245, 290, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 275, 292, 160, 18, 1072255, 0x7FFF, false, false ); // Human

				AddHtmlLocalized( 275, 312, 160, 18, 1072256, 0x421F, false, false ); // Elf
			}
			else
			{
				// Change hair
				for ( int i = 0; i < m_HairStyles.Length; i++ )
				{
					HairOrBeard hair = m_HairStyles[i];
	
					AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 );
					AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false );
				}
	
				// Remove Hair	
				AddButton( 10, 70 + m_HairStyles.Length * 20, 0xFB1, 0xFB3, 2, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 72 + m_HairStyles.Length * 20, 110, 18, 1011403, 0x7FFF, false, false ); // Remove
	
				// Color Hair
				AddButton( 10, 70 + (m_HairStyles.Length + 1) * 20, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 45, 72 + (m_HairStyles.Length + 1) * 20, 110, 18, 1011402, 0x7FFF, false, false ); // Color
				
				// Change gender and beard				
				if ( vendor.Female )
				{
					AddButton( 160, 290, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
					AddHtmlLocalized( 195, 292, 160, 18, 1015327, 0x7FFF, false, false ); // Male
	
					AddHtmlLocalized( 195, 312, 160, 18, 1015328, 0x421F, false, false ); // Female
				}
				else
				{
					AddHtmlLocalized( 160, 42, 210, 18, 1062460, 0x421F, false, false ); // <CENTER>BEARD</CENTER>
	
					for ( int i = 0; i < m_BeardStyles.Length; i++ )
//.........这里部分代码省略.........
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:101,代码来源:PlayerVendorGumps.cs

示例10: PVHuePicker

			public PVHuePicker( PlayerVendor vendor, bool facialHair, Mobile from ) : base( 0xFAB )
			{
				m_Vendor = vendor;
				m_FacialHair = facialHair;
				m_From = from;
			}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:6,代码来源:PlayerVendorGumps.cs

示例11: NewPlayerVendorOwnerGump

		public NewPlayerVendorOwnerGump( PlayerVendor vendor ) : base( 50, 200 )
		{
			m_Vendor = vendor;

			int perRealWorldDay = vendor.ChargePerRealWorldDay;
			int goldHeld = vendor.HoldGold;

			AddBackground( 25, 10, 530, 180, 0x13BE );

			AddImageTiled( 35, 20, 510, 160, 0xA40 );
			AddAlphaRegion( 35, 20, 510, 160 );

			AddImage( 10, 0, 0x28DC );
			AddImage( 537, 175, 0x28DC );
			AddImage( 10, 175, 0x28DC );
			AddImage( 537, 0, 0x28DC );

			if ( goldHeld < perRealWorldDay )
			{
				int goldNeeded = perRealWorldDay - goldHeld;

				AddHtmlLocalized( 40, 35, 260, 20, 1038320, 0x7FFF, false, false ); // Gold needed for 1 day of vendor salary: 
				AddLabel( 300, 35, 0x1F, goldNeeded.ToString() );
			}
			else
			{
				int days = goldHeld / perRealWorldDay;

				AddHtmlLocalized( 40, 35, 260, 20, 1038318, 0x7FFF, false, false ); // # of days Vendor salary is paid for: 
				AddLabel( 300, 35, 0x480, days.ToString() );
			}

			AddHtmlLocalized( 40, 58, 260, 20, 1038324, 0x7FFF, false, false ); // My charge per real world day is: 
			AddLabel( 300, 58, 0x480, perRealWorldDay.ToString() );

			AddHtmlLocalized( 40, 82, 260, 20, 1038322, 0x7FFF, false, false ); // Gold held in my account: 
			AddLabel( 300, 82, 0x480, goldHeld.ToString() );

			AddHtmlLocalized( 40, 108, 260, 20, 1062509, 0x7FFF, false, false ); // Shop Name:
			AddLabel( 140, 106, 0x66D, vendor.ShopName );

			if ( vendor is RentedVendor )
			{
				int days, hours;
				((RentedVendor)vendor).ComputeRentalExpireDelay( out days, out hours );

				AddLabel( 38, 132, 0x480, String.Format( "Location rental will expire in {0} day{1} and {2} hour{3}.", days, days != 1 ? "s" : "", hours, hours != 1 ? "s" : "" ) );
			}

			AddButton( 390, 24, 0x15E1, 0x15E5, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 408, 21, 120, 20, 1019068, 0x7FFF, false, false ); // See goods

			AddButton( 390, 44, 0x15E1, 0x15E5, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 408, 41, 120, 20, 1019069, 0x7FFF, false, false ); // Customize

			AddButton( 390, 64, 0x15E1, 0x15E5, 3, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 408, 61, 120, 20, 1062434, 0x7FFF, false, false ); // Rename Shop

			AddButton( 390, 84, 0x15E1, 0x15E5, 4, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 408, 81, 120, 20, 3006217, 0x7FFF, false, false ); // Rename Vendor

			AddButton( 390, 104, 0x15E1, 0x15E5, 5, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 408, 101, 120, 20, 3006123, 0x7FFF, false, false ); // Open Paperdoll

			AddButton( 390, 124, 0x15E1, 0x15E5, 6, GumpButtonType.Reply, 0 );
			AddLabel( 408, 121, 0x480, "Collect Gold" );

			AddButton( 390, 144, 0x15E1, 0x15E5, 7, GumpButtonType.Reply, 0 );
			AddLabel( 408, 141, 0x480, "Dismiss Vendor" );

			AddButton( 390, 162, 0x15E1, 0x15E5, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 408, 161, 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:73,代码来源:PlayerVendorGumps.cs

示例12: PlayerVendorBuyGump

        public PlayerVendorBuyGump( PlayerVendor vendor, VendorItem vi )
            : base(100, 200)
        {
            m_Vendor = vendor;
            m_VI = vi;

            AddBackground(100, 10, 300, 150, 9270);

            AddHtml(125, 20, 250, 24, "Voce está comprando este item:", false, false); // You have agreed to purchase:

            //if ( !String.IsNullOrEmpty( vi.Description ) )
            //    AddLabel( 125, 45, 0, vi.Description );
            //else
                AddHtml(125, 45, 250, 24, vi.Item.Name, false, false); // an item without a description

            AddHtml(125, 70, 250, 24, "pela quantia de:", false, false); // for the amount of:
            AddHtml(125, 95, 250, 24, vi.Price.ToString() + " Gold", false, false); // for the amount of:
            //AddLabel( 125, 95, 0, vi.Price.ToString() );

            AddButton( 250, 130, 4005, 4007, 0, GumpButtonType.Reply, 0 );
            AddHtml(282, 130, 100, 24, "Cancelar", false, false); // CANCEL

            AddButton( 120, 130, 4005, 4007, 1, GumpButtonType.Reply, 0 );
            AddHtml(152, 130, 100, 24, "Confirmar", false, false); // OKAY
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:25,代码来源:PlayerVendorGumps.cs

示例13: PlayerVendorOwnerGump

		public PlayerVendorOwnerGump( PlayerVendor vendor ) : base( 50, 200 )
		{
			m_Vendor = vendor;

			int perDay = m_Vendor.ChargePerDay;

			AddPage( 0 );
			AddBackground( 25, 10, 530, 140, 5054 );

			AddHtmlLocalized( 425, 25, 120, 20, 1019068, false, false ); // See goods
			AddButton( 390, 25, 4005, 4007, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 425, 48, 120, 20, 1019069, false, false ); // Customize
			AddButton( 390, 48, 4005, 4007, 2, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 425, 72, 120, 20, 1011012, false, false ); // CANCEL
			AddButton( 390, 71, 4005, 4007, 0, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 40, 72, 260, 20, 1038321, false, false ); // Gold held for you:
			AddLabel( 300, 72, 0, m_Vendor.HoldGold.ToString() );
			AddHtmlLocalized( 40, 96, 260, 20, 1038322, false, false ); // Gold held in my account:
			AddLabel( 300, 96, 0, m_Vendor.BankAccount.ToString() );

			//AddHtmlLocalized( 40, 120, 260, 20, 1038324, false, false ); // My charge per day is:
			// Localization has changed, we must use a string here
			AddHtml( 40, 120, 260, 20, "My charge per day is:", false, false );
			AddLabel( 300, 120, 0, perDay.ToString() );

			double days = (m_Vendor.HoldGold + m_Vendor.BankAccount) / ((double)perDay);

			AddHtmlLocalized( 40, 25, 260, 20, 1038318, false, false ); // Amount of days I can work: 
			AddLabel( 300, 25, 0, ((int)days).ToString() );
			AddHtmlLocalized( 40, 48, 260, 20, 1038319, false, false ); // Earth days: 
			AddLabel( 300, 48, 0, ((int)(days / 12.0)).ToString() );
		}
开发者ID:ITLongwell,项目名称:mondains-legacy,代码行数:33,代码来源:PlayerVendorGumps.cs

示例14: ShopMap

        public ShopMap(PlayerVendor vendor, Container container)
        {
            m_DestLocation = vendor.House.BanLocation;
            m_DestMap = vendor.Map;
            Facet = m_DestMap;
            m_VendorName = vendor.Name;
            m_ShopName = vendor.ShopName;
            m_Container = container;

            Hue = RecallRune.CalculateHue(m_DestMap);

            const int width = 400;
            const int height = 400;

            SetDisplay(vendor.X - (width/2), vendor.Y - (height/2), vendor.X + (width/2), vendor.Y + (height/2), width,
                height);
            AddWorldPin(vendor.X, vendor.Y);

            Timer.DelayCall(TimeSpan.FromMinutes(DeleteDelayMinutes), Delete);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:20,代码来源:ShopMap.cs

示例15: NewPlayerVendorCustomizeGump

        public NewPlayerVendorCustomizeGump( PlayerVendor vendor )
            : base(50, 50)
        {
            m_Vendor = vendor;

            AddBackground(0, 0, 370, 370, 9270); ; // AddBackground(0, 0, 370, 370, 0x13BE);

            AddImageTiled( 10, 10, 350, 20, 0xA40 );
            AddImageTiled( 10, 40, 350, 20, 0xA40 );
            AddImageTiled( 10, 70, 350, 260, 0xA40 );
            AddImageTiled( 10, 340, 350, 20, 0xA40 );

            //AddAlphaRegion( 10, 10, 350, 350 );

            AddHtml(10, 12, 350, 18, "<center>CUSTOMIZAR VENDEDOR</center>", false, false); // <center>VENDOR CUSTOMIZATION MENU</center>

            AddHtml(10, 42, 150, 18, "Cabelo", false, false); // <CENTER>HAIR</CENTER>

            for ( int i = 0; i < m_HairStyles.Length; i++ )
            {
                HairOrBeard hair = m_HairStyles[i];

                AddButton( 10, 70 + i * 20, 0xFA5, 0xFA7, 0x100 | i, GumpButtonType.Reply, 0 );
                AddHtmlLocalized( 45, 72 + i * 20, 110, 18, hair.Name, 0x7FFF, false, false );
            }

            AddButton( 10, 70 + m_HairStyles.Length * 20, 0xFB1, 0xFB3, 2, GumpButtonType.Reply, 0 );
            AddHtml(45, 72 + m_HairStyles.Length * 20, 110, 18, "Remover", false, false); // Remove

            AddButton( 10, 70 + (m_HairStyles.Length + 1) * 20, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
            AddHtml(45, 72 + (m_HairStyles.Length + 1) * 20, 110, 18, "Cor", false, false); // Color

            if ( vendor.Female )
            {
                AddButton( 160, 290, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
                AddHtml(195, 292, 160, 18, "Homem", false, false); // Male

                AddHtml(195, 312, 160, 18, "Mulher", false, false); // Female
            }
            else
            {
                AddHtml(160, 42, 210, 18, "Barba", false, false); // <CENTER>BEARD</CENTER>

                for ( int i = 0; i < m_BeardStyles.Length; i++ )
                {
                    HairOrBeard beard = m_BeardStyles[i];

                    AddButton( 160, 70 + i * 20, 0xFA5, 0xFA7, 0x200 | i, GumpButtonType.Reply, 0 );
                    AddHtmlLocalized( 195, 72 + i * 20, 160, 18, beard.Name, 0x7FFF, false, false );
                }

                AddButton( 160, 70 + m_BeardStyles.Length * 20, 0xFB1, 0xFB3, 4, GumpButtonType.Reply, 0 );
                AddHtml(195, 72 + m_BeardStyles.Length * 20, 160, 18, "Remover", false, false); // Remove

                AddButton( 160, 70 + (m_BeardStyles.Length + 1) * 20, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 );
                AddHtml(195, 72 + (m_BeardStyles.Length + 1) * 20, 160, 18, "Cor", false, false); // Color

                AddHtml(195, 292, 160, 18, "Homem", false, false); // Male

                AddButton( 160, 310, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
                AddHtml(195, 312, 160, 18, "Mulher", false, false); // Female
            }

            AddButton( 10, 340, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
            AddHtml(45, 342, 305, 18, "Fechar", false, false); // CLOSE
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:66,代码来源:PlayerVendorGumps.cs


注:本文中的Server.Mobiles.PlayerVendor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。