public InternalTarget(ContractSetupGump gump, RentalContract contract, TargetType type, Point3D point) : base(20, true, TargetFlags.None)
 {
     c_Gump     = gump;
     c_Contract = contract;
     c_Type     = type;
     c_BoundOne = point;
 }
        public override void OnDoubleClick(Mobile m)
        {
            ValidateOwnership();

            if (Deleted)
            {
                return;
            }

            if (c_RentalMaster == null)
            {
                c_RentalMaster = m;
            }

            BaseHouse house = BaseHouse.FindHouseAt(m);

            if (c_ParentHouse == null)
            {
                c_ParentHouse = house;
            }

            if (house == null || (house != c_ParentHouse && house != House))
            {
                m.SendMessage("You must be in the home to view this contract.");
                return;
            }

            if (m == c_RentalMaster &&
                !c_Completed &&
                house is TownHouse &&
                ((TownHouse)house).ForSaleSign.PriceType != "Sale")
            {
                c_ParentHouse = null;
                m.SendMessage("You can only rent property you own.");
                return;
            }

            if (m == c_RentalMaster && !c_Completed && General.EntireHouseContracted(c_ParentHouse))
            {
                m.SendMessage("This entire house already has a rental contract.");
                return;
            }

            if (c_Completed)
            {
                ContractConfirmGump.SendTo(m, this);
            }
            else if (m == c_RentalMaster)
            {
                ContractSetupGump.SendTo(m, this);
            }
            else
            {
                m.SendMessage("This rental contract has not yet been completed.");
            }
        }
			public InternalTarget( ContractSetupGump gump, RentalContract contract, TargetType type, Point3D point ) : base( 20, true, TargetFlags.None )
			{
				c_Gump = gump;
				c_Contract = contract;
				c_Type = type;
				c_BoundOne = point;
			}
			public InternalTarget( ContractSetupGump gump, RentalContract contract, TargetType type ) : this( gump, contract, type, Point3D.Zero ){}
Exemple #5
0
 public InternalTarget(ContractSetupGump gump, RentalContract contract, TargetType type)
     : this(gump, contract, type, Point3D.Zero)
 {
 }