Ejemplo n.º 1
0
        private static int GetHouseDeedsInContainer(Container c, ref int count)
        {
            int iGold = 0;

            Item[] deeds = c.FindItemsByType(typeof(Server.Multis.Deeds.HouseDeed), true);
            foreach (Item i in deeds)
            {
                Server.Multis.Deeds.HouseDeed housedeed = i as Server.Multis.Deeds.HouseDeed;
                // don't count tents as they cannot be redeemed for cash
                if (housedeed != null && housedeed is SiegeTentBag == false && housedeed is TentBag == false)
                {
                    count++;
                    iGold += RealEstateBroker.ComputePriceFor(housedeed);
                }
            }

            Item[] BUCdeeds = c.FindItemsByType(typeof(BaseUpgradeContract), true);
            foreach (Item i in BUCdeeds)
            {
                BaseUpgradeContract budeed = i as BaseUpgradeContract;
                if (budeed != null)
                {
                    count++;
                    iGold += (int)budeed.Price;
                }
            }


            return(iGold);
        }
Ejemplo n.º 2
0
        public int ComputePriceFor( HouseDeed deed )
        {
            int price = 0;

            if ( deed is SmallBrickHouseDeed || deed is StonePlasterHouseDeed || deed is FieldStoneHouseDeed || deed is SmallBrickHouseDeed || deed is WoodHouseDeed || deed is WoodPlasterHouseDeed || deed is ThatchedRoofCottageDeed )
                price = 43800;
            else if ( deed is BrickHouseDeed )
                price = 144500;
            else if ( deed is TwoStoryWoodPlasterHouseDeed || deed is TwoStoryStonePlasterHouseDeed )
                price = 192400;
            else if ( deed is TowerDeed )
                price = 433200;
            else if ( deed is KeepDeed )
                price = 665200;
            else if ( deed is CastleDeed )
                price = 1022800;
            else if ( deed is LargePatioDeed )
                price = 152800;
            else if ( deed is LargeMarbleDeed )
                price = 192800;
            else if ( deed is SmallTowerDeed )
                price = 88500;
            else if ( deed is LogCabinDeed )
                price = 97800;
            else if ( deed is SandstonePatioDeed )
                price = 90900;
            else if ( deed is VillaDeed )
                price = 136500;
            else if ( deed is StoneWorkshopDeed )
                price = 60600;
            else if ( deed is MarbleWorkshopDeed )
                price = 60300;

            return AOS.Scale( price, 80 ); // refunds 80% of the purchase price
        }
Ejemplo n.º 3
0
 public HousePlacementTarget(HouseDeed deed)
     : base(deed.MultiID, deed.Offset)
 {
     this.m_Deed = deed;
 }
Ejemplo n.º 4
0
 public HousePlacementTarget(HouseDeed deed) : base(deed.MultiID, deed.Offset)
 {
     m_Deed = deed;
 }
Ejemplo n.º 5
0
		public static int ComputePriceFor(HouseDeed deed)
		{
			int price = 0;

			if (deed is SmallBrickHouseDeed || deed is StonePlasterHouseDeed || deed is FieldStoneHouseDeed || deed is SmallBrickHouseDeed || deed is WoodHouseDeed || deed is WoodPlasterHouseDeed || deed is ThatchedRoofCottageDeed)
				price = 43800;
			else if (deed is BrickHouseDeed)
				price = 144500;
			else if (deed is TwoStoryWoodPlasterHouseDeed || deed is TwoStoryStonePlasterHouseDeed)
				price = 192400;
			else if (deed is TowerDeed)
				price = 433200;
			else if (deed is KeepDeed)
				price = 665200;
			else if (deed is CastleDeed)
				price = 1022800;
			else if (deed is LargePatioDeed)
				price = 152800;
			else if (deed is LargeMarbleDeed)
				price = 192800;
			else if (deed is SmallTowerDeed)
				price = 88500;
			else if (deed is LogCabinDeed)
				price = 97800;
			else if (deed is SandstonePatioDeed)
				price = 90900;
			else if (deed is VillaDeed)
				price = 136500;
			else if (deed is StoneWorkshopDeed)
				price = 60600;
			else if (deed is MarbleWorkshopDeed)
				price = 60300;
			else if (deed is StaticDeed) //pla: Allow our static houses to be sold back based on price in blueprint
			{
				price = StaticHouseHelper.GetPrice(((StaticDeed)deed).HouseID);
				
				//check for the failsafe price and if so set to 0 - dont want someone getting 8 million back!
				if (price == (int)StaticHouseHelper.Error.PriceError)
					price = 0;
				
				// track the error
				Misc.Diagnostics.Assert(price != 0, "price == 0");
			}

			return AOS.Scale(price, 80); // refunds 80% of the purchase price
		}