當前位置: 首頁>>代碼示例>>C#>>正文


C# Mobiles.RentedVendor類代碼示例

本文整理匯總了C#中Server.Mobiles.RentedVendor的典型用法代碼示例。如果您正苦於以下問題:C# RentedVendor類的具體用法?C# RentedVendor怎麽用?C# RentedVendor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


RentedVendor類屬於Server.Mobiles命名空間,在下文中一共展示了RentedVendor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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 
			{
				BaseHouse building = BaseHouse.FindHouseAt( from );
				if ( building == m_house && this.Owner == from )
				{
					VendorRentalDuration m_Expire;
					m_Expire = VendorRentalDuration.Instances[(int)m_duration];
					PlayerVendor vendor = new RentedVendor( m_owner, m_house, m_Expire, m_rent, true, m_rent );
					vendor.MoveToWorld( from.Location, from.Map );
					this.Delete();
				}
				else
					from.SendMessage( "You may only use this in a vendor mall you have paid for a slot in!" );
			}
		}
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:21,代碼來源:MallToken.cs

示例2: TerminateContractEntry

 public TerminateContractEntry( RentedVendor vendor )
     : base(6218)
 {
     m_Vendor = vendor;
 }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:5,代碼來源:RentedVendor.cs

示例3: RentalExpireTimer

            public RentalExpireTimer( RentedVendor vendor, TimeSpan delay )
                : base(delay, vendor.RentalDuration.Duration)
            {
                m_Vendor = vendor;

                Priority = TimerPriority.OneMinute;
            }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:7,代碼來源:RentedVendor.cs

示例4: RefundOfferPrompt

 public RefundOfferPrompt( RentedVendor vendor )
 {
     m_Vendor = vendor;
 }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:4,代碼來源:RentedVendor.cs

示例5: ContractOptionsEntry

 public ContractOptionsEntry( RentedVendor vendor )
     : base(6209)
 {
     m_Vendor = vendor;
 }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:5,代碼來源:RentedVendor.cs

示例6: CollectRentEntry

 public CollectRentEntry( RentedVendor vendor )
     : base(6212)
 {
     m_Vendor = vendor;
 }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:5,代碼來源:RentedVendor.cs

示例7: VendorRentalRefundGump

        public VendorRentalRefundGump(RentedVendor vendor, Mobile landlord, int refundAmount)
            : base(50, 50)
        {
            this.m_Vendor = vendor;
            this.m_Landlord = landlord;
            this.m_RefundAmount = refundAmount;

            this.AddBackground(0, 0, 420, 320, 0x13BE);

            this.AddImageTiled(10, 10, 400, 300, 0xA40);
            this.AddAlphaRegion(10, 10, 400, 300);

            /* The landlord for this vendor is offering you a partial refund of your rental fee
            * in exchange for immediate termination of your rental contract.<BR><BR>
            * 
            * If you accept this offer, the vendor will be immediately dismissed.  You will then
            * be able to claim the inventory and any funds the vendor may be holding for you via
            * a context menu on the house sign for this house.
            */
            this.AddHtmlLocalized(10, 10, 400, 150, 1062501, 0x7FFF, false, true);

            this.AddHtmlLocalized(10, 180, 150, 20, 1062508, 0x7FFF, false, false); // Vendor Name:
            this.AddLabel(160, 180, 0x480, vendor.Name);

            this.AddHtmlLocalized(10, 200, 150, 20, 1062509, 0x7FFF, false, false); // Shop Name:
            this.AddLabel(160, 200, 0x480, vendor.ShopName);

            this.AddHtmlLocalized(10, 220, 150, 20, 1062510, 0x7FFF, false, false); // Refund Amount:
            this.AddLabel(160, 220, 0x480, refundAmount.ToString());

            this.AddButton(10, 268, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(45, 268, 350, 20, 1062511, 0x7FFF, false, false); // Agree, and <strong>dismiss vendor</strong>

            this.AddButton(10, 288, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0);
            this.AddHtmlLocalized(45, 288, 350, 20, 1062512, 0x7FFF, false, false); // No, I want to <strong>keep my vendor</strong>
        }
開發者ID:zerodowned,項目名稱:justuo-with-ec-support,代碼行數:36,代碼來源:VendorRentalGumps.cs

示例8: ContractRenewalPricePrompt

 public ContractRenewalPricePrompt(RentedVendor vendor)
 {
     this.m_Vendor = vendor;
 }
開發者ID:zerodowned,項目名稱:justuo-with-ec-support,代碼行數:4,代碼來源:VendorRentalGumps.cs

示例9: LandlordVendorRentalGump

 public LandlordVendorRentalGump(RentedVendor vendor)
     : base(
     GumpType.VendorLandlord, vendor.RentalDuration, vendor.RentalPrice, vendor.RenewalPrice,
     vendor.Landlord, vendor.Owner, vendor.LandlordRenew, vendor.RenterRenew, vendor.Renew)
 {
     this.m_Vendor = vendor;
 }
開發者ID:zerodowned,項目名稱:justuo-with-ec-support,代碼行數:7,代碼來源:VendorRentalGumps.cs

示例10: AcceptOffer

        protected override void AcceptOffer(Mobile from)
        {
            this.m_Contract.Offeree = null;

            if (!this.m_Contract.Map.CanFit(this.m_Contract.Location, 16, false, false))
            {
                this.m_Landlord.SendLocalizedMessage(1062486); // A vendor cannot exist at that location.  Please try again.
                return;
            }

            BaseHouse house = BaseHouse.FindHouseAt(this.m_Contract);
            if (house == null)
                return;

            int price = this.m_Contract.Price;
            int goldToGive;

            if (price > 0)
            {
                if (Banker.Withdraw(from, price))
                {
                    from.SendLocalizedMessage(1060398, price.ToString()); // ~1_AMOUNT~ gold has been withdrawn from your bank box.

                    int depositedGold = Banker.DepositUpTo(this.m_Landlord, price);
                    goldToGive = price - depositedGold;

                    if (depositedGold > 0)
                        this.m_Landlord.SendLocalizedMessage(1060397, price.ToString()); // ~1_AMOUNT~ gold has been deposited into your bank box.

                    if (goldToGive > 0)
                        this.m_Landlord.SendLocalizedMessage(500390); // Your bank box is full.
                }
                else
                {
                    from.SendLocalizedMessage(1062378); // You do not have enough gold in your bank account to cover the cost of the contract.
                    this.m_Landlord.SendLocalizedMessage(1062374, from.Name); // ~1_NAME~ has declined your vendor rental offer.

                    return;
                }
            }
            else
            {
                goldToGive = 0;
            }

            PlayerVendor vendor = new RentedVendor(from, house, this.m_Contract.Duration, price, this.m_Contract.LandlordRenew, goldToGive);
            vendor.MoveToWorld(this.m_Contract.Location, this.m_Contract.Map);

            this.m_Contract.Delete();

            from.SendLocalizedMessage(1062377); // You have accepted the offer and now own a vendor in this house.  Rental contract options and details may be viewed on this vendor via the 'Contract Options' context menu.
            this.m_Landlord.SendLocalizedMessage(1062376, from.Name); // ~1_NAME~ has accepted your vendor rental offer.  Rental contract details and options may be viewed on this vendor via the 'Contract Options' context menu.
        }
開發者ID:zerodowned,項目名稱:justuo-with-ec-support,代碼行數:53,代碼來源:VendorRentalGumps.cs

示例11: AcceptOffer

		protected override void AcceptOffer(Mobile from)
		{
			m_Contract.Offeree = null;

			if (!m_Contract.Map.CanFit(m_Contract.Location, 16, false, false))
			{
				m_Landlord.SendLocalizedMessage(1062486); // A vendor cannot exist at that location.  Please try again.
				return;
			}

			BaseHouse house = BaseHouse.FindHouseAt(m_Contract);
			if (house == null)
			{
				return;
			}

			int price = m_Contract.Price;
			int currencyToGive;

			if (price > 0)
			{
				Type cType = m_Contract.Expansion == Expansion.T2A ? typeof(Silver) : typeof(Gold);

				if (Banker.Withdraw(from, cType, price))
				{
					from.SendMessage("{0:#,0} {1} has been withdrawn from your bank box.", price, cType.Name);

					int depositedCurrency = Banker.DepositUpTo(m_Landlord, cType, price);
					currencyToGive = price - depositedCurrency;

					if (depositedCurrency > 0)
					{
						m_Landlord.SendMessage("{0:#,0} {1} has been deposited into your bank box.", price, cType.Name);
					}

					if (currencyToGive > 0)
					{
						m_Landlord.SendLocalizedMessage(500390); // Your bank box is full.
					}
				}
				else
				{
					from.SendMessage("You do not have enough {0} in your bank account to cover the cost of the contract.", cType.Name);

					m_Landlord.SendLocalizedMessage(1062374, from.Name); // ~1_NAME~ has declined your vendor rental offer.

					return;
				}
			}
			else
			{
				currencyToGive = 0;
			}

			PlayerVendor vendor = new RentedVendor(
				from, house, m_Contract.Duration, price, m_Contract.LandlordRenew, currencyToGive);
			vendor.MoveToWorld(m_Contract.Location, m_Contract.Map);

			m_Contract.Delete();

			// You have accepted the offer and now own a vendor in this house.  Rental contract options and details may be viewed on this vendor via the 'Contract Options' context menu.
			from.SendLocalizedMessage(1062377);

			// ~1_NAME~ has accepted your vendor rental offer.  Rental contract details and options may be viewed on this vendor via the 'Contract Options' context menu.
			m_Landlord.SendLocalizedMessage(1062376, from.Name);
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:66,代碼來源:VendorRentalGumps.cs

示例12: VendorRentalRefundGump

		public VendorRentalRefundGump( RentedVendor vendor, Mobile landlord, int refundAmount ) : base( 50, 50 )
		{
			m_Vendor = vendor;
			m_Landlord = landlord;
			m_RefundAmount = refundAmount;

			AddBackground( 0, 0, 420, 320, 0x13BE );

			AddImageTiled( 10, 10, 400, 300, 0xA40 );
			AddAlphaRegion( 10, 10, 400, 300 );

			/* The landlord for this vendor is offering you a partial refund of your rental fee
			 * in exchange for immediate termination of your rental contract.<BR><BR>
			 * 
			 * If you accept this offer, the vendor will be immediately dismissed.  Any items still on the vendor
			 * will drop to the ground, any funds the vendor is holding for you shall be deposited into your bank account.
			 */
			
			AddHtml( 10, 10, 400, 150, "The landlord for this vendor is offering you a partial refund of your rental fee in exchange for immediate termination of your rental contract. If you accept this offer, the vendor will be immediately dismissed. Any items still on the vendor will drop to the ground, any funds the vendor is holding for you shall be deposited into your bank account.", false, true );

			AddHtmlLocalized( 10, 180, 150, 20, 1062508, 0x7FFF, false, false ); // Vendor Name:
			AddLabel( 160, 180, 0x480, vendor.Name );

			AddHtmlLocalized( 10, 220, 150, 20, 1062510, 0x7FFF, false, false ); // Refund Amount:
			AddLabel( 160, 220, 0x480, refundAmount.ToString() );

			AddButton( 10, 268, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 45, 268, 350, 20, 1062511, 0x7FFF, false, false ); // Agree, and <strong>dismiss vendor</strong>

			AddButton( 10, 288, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
			AddHtmlLocalized( 45, 288, 350, 20, 1062512, 0x7FFF, false, false ); // No, I want to <strong>keep my vendor</strong>
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:32,代碼來源:VendorRentalGumps.cs

示例13: ContractRenewalPricePrompt

 public ContractRenewalPricePrompt( RentedVendor vendor )
     : base(vendor)
 {
     m_Vendor = vendor;
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:5,代碼來源:VendorRentalGumps.cs

示例14: RentalExpireTimer

 public RentalExpireTimer( RentedVendor vendor, TimeSpan delay )
     : base(delay, vendor.RentalDuration.Duration)
 {
     m_Vendor = vendor;
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:5,代碼來源:RentedVendor.cs

示例15: CollectRentEntry

            public CollectRentEntry( RentedVendor vendor )
                : base(6212)
            {
                m_Vendor = vendor;

                if ( m_Vendor.RentalGold <= 0 )
                    Flags |= Network.CMEFlags.Disabled;
            }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:8,代碼來源:RentedVendor.cs


注:本文中的Server.Mobiles.RentedVendor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。