示例#1
0
            public override void OnClick()
            {
                Mobile from = Owner.From;

                if (m_Vendor.Deleted || !from.CheckAlive())
                {
                    return;
                }

                if (m_Vendor.IsOwner(from))
                {
                    from.CloseGump(typeof(RenterVendorRentalGump));
                    from.SendGump(new RenterVendorRentalGump(m_Vendor));

                    m_Vendor.SendRentalExpireMessage(from);
                }
                else if (m_Vendor.IsLandlord(from))
                {
                    from.CloseGump(typeof(LandlordVendorRentalGump));
                    from.SendGump(new LandlordVendorRentalGump(m_Vendor));

                    m_Vendor.SendRentalExpireMessage(from);
                }
            }
示例#2
0
            public override void OnClick()
            {
                Mobile from = Owner.From;

                if (m_Vendor.Deleted || !from.CheckAlive() || !m_Vendor.IsLandlord(from))
                {
                    return;
                }

                if (m_Vendor.RentalGold > 0)
                {
                    int depositedGold = Banker.DepositUpTo(from, m_Vendor.RentalGold);
                    m_Vendor.RentalGold -= depositedGold;

                    if (depositedGold > 0)
                    {
                        from.SendLocalizedMessage(1060397, depositedGold.ToString()); // ~1_AMOUNT~ gold has been deposited into your bank box.
                    }
                    if (m_Vendor.RentalGold > 0)
                    {
                        from.SendLocalizedMessage(500390); // Your bank box is full.
                    }
                }
            }