context: using System;
  using Server.Items;
  using Server.Multis.Deeds;
  
  namespace Server.Multis
  {
      public class SmallOldHouse : BaseHouse
      {
          public static Rectangle2D[] AreaArray = new Rectangle2D[] { new Rectangle2D(-3,-3,7,7), new Rectangle2D(-1, 4, 3, 1) };
          public SmallOldHouse(Mobile owner, int id)
              : base(id, owner, 425, 3)
          {
              uint keyValue = CreateKeys(owner);
  
              AddSouthDoor(0, 3, 7, keyValue);
  
              SetSign(2, 4, 5);
          }
  
          public SmallOldHouse(Serial serial)
              : base(serial)
          {
          }
  
          public override Rectangle2D[] Area
          {
              get
              {
                  return AreaArray;
              }
          }
          public override Point3D BaseBanLocation
          {
              get
              {
                  return new Point3D(2, 4, 0);
              }
          }
          public override int DefaultPrice
          {
              get
              {
                  return 43800;
              }
          }
          public override HousePlacementEntry ConvertEntry
          {
              get
              {
                  return HousePlacementEntry.TwoStoryFoundations[0];
              }
          }
          public override HouseDeed GetDeed() 
          {
              switch ( ItemID )
              {
                  case 0x64:
                      return new StonePlasterHouseDeed();
                  case 0x66:
                      return new FieldStoneHouseDeed();
                  case 0x68:
                      return new SmallBrickHouseDeed();
                  case 0x6A:
                      return new WoodHouseDeed();
                  case 0x6C:
                      return new WoodPlasterHouseDeed(); 
                  case 0x6E: 
                  default:
                      return new ThatchedRoofCottageDeed();
              }
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
              writer.Write((int)0);//version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
              int version = reader.ReadInt();
          }
      }
  
      public class GuildHouse : BaseHouse
      {
          public static Rectangle2D[] AreaArray = new Rectangle2D[] { new Rectangle2D(-7, -7, 14, 14), new Rectangle2D(-2, 7, 4, 1) };
          public GuildHouse(Mobile owner)
              : base(0x74, owner, 1100, 8)
          {
              uint keyValue = CreateKeys(owner);
  
              AddSouthDoors(-1, 6, 7, keyValue);
  
              SetSign(4, 8, 16);
  
              AddSouthDoor(-3, -1, 7);
              AddSouthDoor(3, -1, 7);
          }
  
          public GuildHouse(Serial serial)
              : base(serial)
          {
          }
  
          public override int DefaultPrice
          {
              get
              {
                  return 144500;
              }
          }
          public override HousePlacementEntry ConvertEntry
          {
              get
              {
                  return HousePlacementEntry.ThreeStoryFoundations[20];
              }
          }
          public override int ConvertOffsetX
          {
              get
              {
                  return -1;
              }
          }
          public override int ConvertOffsetY
          {
              get
              {
                  return -1;
              }
          }
          public override Rectangle2D[] Area
          {
              get
              {
                  return AreaArray;
              }
          }
          public override Point3D BaseBanLocation
          {
              get
              {
                  return new Point3D(4, 8, 0);
              }
          }
          public override HouseDeed GetDeed()
          {
              return new BrickHouseDeed();
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
              writer.Write((int)0);//version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
              int version = reader.ReadInt();
          }
      }
  
      public class TwoStoryHouse : BaseHouse
      {
          public static Rectangle2D[] AreaArray = new Rectangle2D[] { new Rectangle2D(-7, 0, 14, 7), new Rectangle2D(-7, -7, 9, 7), new Rectangle2D(-4, 7, 4, 1) };
          public TwoStoryHouse(Mobile owner, int id)
              : base(id, owner, 1370, 10)
          {
              uint keyValue = CreateKeys(owner);
  
              AddSouthDoors(-3, 6, 7, keyValue);
  
              SetSign(2, 8, 16);
  
              AddSouthDoor(-3, 0, 7);
              AddSouthDoor(id == 0x76 ? -2 : -3, 0, 27);
          }
  
          public TwoStoryHouse(Serial serial)
              : base(serial)
          {
          }
  
          public override Rectangle2D[] Area
          {
              get
              {
                  return AreaArray;
              }
          }
          public override Point3D BaseBanLocation
          {
              get
              {
                  return new Point3D(2, 8, 0);
              }
          }
          public override int DefaultPrice
          {
              get
              {
                  return 192400;
              }
          }
          public override HouseDeed GetDeed() 
          { 
              switch( ItemID )
              {
                  case 0x76:
                      return new TwoStoryWoodPlasterHouseDeed();
                  case 0x78:
                  default:
                      return new TwoStoryStonePlasterHouseDeed();
              }
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
              writer.Write((int)0);//version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
              int version = reader.ReadInt();
          }
      }
  
      public class Tower : BaseHouse
      {
          public static Rectangle2D[] AreaArray = new Rectangle2D[] { new Rectangle2D(-7, -7, 16, 14), new Rectangle2D(-1, 7, 4, 2), new Rectangle2D(-11, 0, 4, 7), new Rectangle2D(9, 0, 4, 7) };
          public Tower(Mobile owner)
              : base(0x7A, owner, 2119, 15)
          {
              uint keyValue = CreateKeys(owner);
  
              AddSouthDoors(false, 0, 6, 6, keyValue);
  
              SetSign(5, 8, 16);
  
              AddSouthDoor(false, 3, -2, 6);
              AddEastDoor(false, 1, 4, 26);
              AddEastDoor(false, 1, 4, 46);
          }
  
          public Tower(Serial serial)
              : base(serial)
          {
          }
  
          public override int DefaultPrice
          {
              get
              {
                  return 433200;
              }
          }
          public override HousePlacementEntry ConvertEntry
          {
              get
              {
                  return HousePlacementEntry.ThreeStoryFoundations[37];
              }
          }
          public override int ConvertOffsetY
          {
              get
              {
                  return -1;
              }
          }
          public override Rectangle2D[] Area
          {
              get
              {
                  return AreaArray;
              }
          }
          public override Point3D BaseBanLocation
          {
              get
              {
                  return new Point3D(5, 8, 0);
              }
          }
          public override HouseDeed GetDeed()
          {
              return new TowerDeed();
          }
  
          public override void Serialize(GenericWriter writer)
          {
              base.Serialize(writer);
              writer.Write((int)0);//version
          }
  
          public override void Deserialize(GenericReader reader)
          {
              base.Deserialize(reader);
  
gt:             int version = reader.ReadInt();