Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

File diff suppressed because it is too large Load diff

View file

@ -35,55 +35,31 @@ namespace Server.Multis
return null;
}
private Hold m_Hold;
private TillerMan m_TillerMan;
private Mobile m_Owner;
private Direction m_Facing;
private Direction m_Moving;
private int m_Speed;
private int m_ClientSpeed;
private bool m_Anchored;
private string m_ShipName;
private BoatOrder m_Order;
private MapItem m_MapItem;
private int m_NextNavPoint;
private Plank m_PPlank, m_SPlank;
private DateTime m_DecayTime;
private Timer m_TurnTimer;
private Timer m_MoveTimer;
[CommandProperty( AccessLevel.GameMaster )]
public Hold Hold{ get => m_Hold;
set => m_Hold = value;
}
public Hold Hold { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public TillerMan TillerMan{ get => m_TillerMan;
set => m_TillerMan = value;
}
public TillerMan TillerMan { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public Plank PPlank{ get => m_PPlank;
set => m_PPlank = value;
}
public Plank PPlank { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public Plank SPlank{ get => m_SPlank;
set => m_SPlank = value;
}
public Plank SPlank { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Owner{ get => m_Owner;
set => m_Owner = value;
}
public Mobile Owner { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public Direction Facing{ get => m_Facing;
@ -91,48 +67,36 @@ namespace Server.Multis
}
[CommandProperty( AccessLevel.GameMaster )]
public Direction Moving{ get => m_Moving;
set => m_Moving = value;
}
public Direction Moving { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool IsMoving => ( m_MoveTimer != null );
[CommandProperty( AccessLevel.GameMaster )]
public int Speed{ get => m_Speed;
set => m_Speed = value;
}
public int Speed { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool Anchored{ get => m_Anchored;
set => m_Anchored = value;
}
public bool Anchored { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public string ShipName{ get => m_ShipName;
set{ m_ShipName = value;
m_TillerMan?.InvalidateProperties();
TillerMan?.InvalidateProperties();
} }
[CommandProperty( AccessLevel.GameMaster )]
public BoatOrder Order{ get => m_Order;
set => m_Order = value;
}
public BoatOrder Order { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public MapItem MapItem{ get => m_MapItem;
set => m_MapItem = value;
}
public MapItem MapItem { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int NextNavPoint{ get => m_NextNavPoint;
set => m_NextNavPoint = value;
}
public int NextNavPoint { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public DateTime TimeOfDecay{ get => m_DecayTime;
set{ m_DecayTime = value;
m_TillerMan?.InvalidateProperties();
TillerMan?.InvalidateProperties();
} }
public int Status
@ -173,30 +137,28 @@ namespace Server.Multis
public virtual BaseDockedBoat DockedBoat => null;
private static List<BaseBoat> m_Instances = new List<BaseBoat>();
public static List<BaseBoat> Boats => m_Instances;
public static List<BaseBoat> Boats { get; } = new List<BaseBoat>();
public BaseBoat() : base( 0x0 )
{
m_DecayTime = DateTime.UtcNow + BoatDecayDelay;
m_TillerMan = new TillerMan( this );
m_Hold = new Hold( this );
TillerMan = new TillerMan( this );
Hold = new Hold( this );
m_PPlank = new Plank( this, PlankSide.Port, 0 );
m_SPlank = new Plank( this, PlankSide.Starboard, 0 );
PPlank = new Plank( this, PlankSide.Port, 0 );
SPlank = new Plank( this, PlankSide.Starboard, 0 );
m_PPlank.MoveToWorld( new Point3D( X + PortOffset.X, Y + PortOffset.Y, Z ), Map );
m_SPlank.MoveToWorld( new Point3D( X + StarboardOffset.X, Y + StarboardOffset.Y, Z ), Map );
PPlank.MoveToWorld( new Point3D( X + PortOffset.X, Y + PortOffset.Y, Z ), Map );
SPlank.MoveToWorld( new Point3D( X + StarboardOffset.X, Y + StarboardOffset.Y, Z ), Map );
Facing = Direction.North;
m_NextNavPoint = -1;
NextNavPoint = -1;
Movable = false;
m_Instances.Add( this );
Boats.Add( this );
}
public BaseBoat( Serial serial ) : base( serial )
@ -212,32 +174,32 @@ namespace Server.Multis
public void UpdateComponents()
{
if ( m_PPlank != null )
if ( PPlank != null )
{
m_PPlank.MoveToWorld( GetRotatedLocation( PortOffset.X, PortOffset.Y ), Map );
m_PPlank.SetFacing( m_Facing );
PPlank.MoveToWorld( GetRotatedLocation( PortOffset.X, PortOffset.Y ), Map );
PPlank.SetFacing( m_Facing );
}
if ( m_SPlank != null )
if ( SPlank != null )
{
m_SPlank.MoveToWorld( GetRotatedLocation( StarboardOffset.X, StarboardOffset.Y ), Map );
m_SPlank.SetFacing( m_Facing );
SPlank.MoveToWorld( GetRotatedLocation( StarboardOffset.X, StarboardOffset.Y ), Map );
SPlank.SetFacing( m_Facing );
}
int xOffset = 0, yOffset = 0;
Movement.Movement.Offset( m_Facing, ref xOffset, ref yOffset );
if ( m_TillerMan != null )
if ( TillerMan != null )
{
m_TillerMan.Location = new Point3D( X + (xOffset * TillerManDistance) + (m_Facing == Direction.North ? 1 : 0), Y + (yOffset * TillerManDistance), m_TillerMan.Z );
m_TillerMan.SetFacing( m_Facing );
m_TillerMan.InvalidateProperties();
TillerMan.Location = new Point3D( X + (xOffset * TillerManDistance) + (m_Facing == Direction.North ? 1 : 0), Y + (yOffset * TillerManDistance), TillerMan.Z );
TillerMan.SetFacing( m_Facing );
TillerMan.InvalidateProperties();
}
if ( m_Hold != null )
if ( Hold != null )
{
m_Hold.Location = new Point3D( X + (xOffset * HoldDistance), Y + (yOffset * HoldDistance), m_Hold.Z );
m_Hold.SetFacing( m_Facing );
Hold.Location = new Point3D( X + (xOffset * HoldDistance), Y + (yOffset * HoldDistance), Hold.Z );
Hold.SetFacing( m_Facing );
}
}
@ -247,19 +209,19 @@ namespace Server.Multis
writer.Write( (int) 3 );
writer.Write( (Item) m_MapItem );
writer.Write( (int) m_NextNavPoint );
writer.Write( (Item) MapItem );
writer.Write( (int) NextNavPoint );
writer.Write( (int) m_Facing );
writer.WriteDeltaTime( m_DecayTime );
writer.Write( m_Owner );
writer.Write( m_PPlank );
writer.Write( m_SPlank );
writer.Write( m_TillerMan );
writer.Write( m_Hold );
writer.Write( m_Anchored );
writer.Write( Owner );
writer.Write( PPlank );
writer.Write( SPlank );
writer.Write( TillerMan );
writer.Write( Hold );
writer.Write( Anchored );
writer.Write( m_ShipName );
CheckDecay();
@ -275,8 +237,8 @@ namespace Server.Multis
{
case 3:
{
m_MapItem = (MapItem) reader.ReadItem();
m_NextNavPoint = reader.ReadInt();
MapItem = (MapItem) reader.ReadItem();
NextNavPoint = reader.ReadInt();
goto case 2;
}
@ -295,7 +257,7 @@ namespace Server.Multis
case 0:
{
if ( version < 3 )
m_NextNavPoint = -1;
NextNavPoint = -1;
if ( version < 2 )
{
@ -309,12 +271,12 @@ namespace Server.Multis
m_Facing = Direction.West;
}
m_Owner = reader.ReadMobile();
m_PPlank = reader.ReadItem() as Plank;
m_SPlank = reader.ReadItem() as Plank;
m_TillerMan = reader.ReadItem() as TillerMan;
m_Hold = reader.ReadItem() as Hold;
m_Anchored = reader.ReadBool();
Owner = reader.ReadMobile();
PPlank = reader.ReadItem() as Plank;
SPlank = reader.ReadItem() as Plank;
TillerMan = reader.ReadItem() as TillerMan;
Hold = reader.ReadItem() as Hold;
Anchored = reader.ReadBool();
m_ShipName = reader.ReadString();
if ( version < 1)
@ -324,18 +286,18 @@ namespace Server.Multis
}
}
m_Instances.Add( this );
Boats.Add( this );
}
public void RemoveKeys( Mobile m )
{
uint keyValue = 0;
if ( m_PPlank != null )
keyValue = m_PPlank.KeyValue;
if ( PPlank != null )
keyValue = PPlank.KeyValue;
if ( keyValue == 0 && m_SPlank != null )
keyValue = m_SPlank.KeyValue;
if ( keyValue == 0 && SPlank != null )
keyValue = SPlank.KeyValue;
Key.RemoveKeys( m, keyValue );
}
@ -370,49 +332,49 @@ namespace Server.Multis
public override void OnAfterDelete()
{
m_TillerMan?.Delete();
TillerMan?.Delete();
m_Hold?.Delete();
Hold?.Delete();
m_PPlank?.Delete();
PPlank?.Delete();
m_SPlank?.Delete();
SPlank?.Delete();
m_TurnTimer?.Stop();
m_MoveTimer?.Stop();
m_Instances.Remove( this );
Boats.Remove( this );
}
public override void OnLocationChange( Point3D old )
{
if ( m_TillerMan != null )
m_TillerMan.Location = new Point3D( X + (m_TillerMan.X - old.X), Y + (m_TillerMan.Y - old.Y), Z + (m_TillerMan.Z - old.Z ) );
if ( TillerMan != null )
TillerMan.Location = new Point3D( X + (TillerMan.X - old.X), Y + (TillerMan.Y - old.Y), Z + (TillerMan.Z - old.Z ) );
if ( m_Hold != null )
m_Hold.Location = new Point3D( X + (m_Hold.X - old.X), Y + (m_Hold.Y - old.Y), Z + (m_Hold.Z - old.Z ) );
if ( Hold != null )
Hold.Location = new Point3D( X + (Hold.X - old.X), Y + (Hold.Y - old.Y), Z + (Hold.Z - old.Z ) );
if ( m_PPlank != null )
m_PPlank.Location = new Point3D( X + (m_PPlank.X - old.X), Y + (m_PPlank.Y - old.Y), Z + (m_PPlank.Z - old.Z ) );
if ( PPlank != null )
PPlank.Location = new Point3D( X + (PPlank.X - old.X), Y + (PPlank.Y - old.Y), Z + (PPlank.Z - old.Z ) );
if ( m_SPlank != null )
m_SPlank.Location = new Point3D( X + (m_SPlank.X - old.X), Y + (m_SPlank.Y - old.Y), Z + (m_SPlank.Z - old.Z ) );
if ( SPlank != null )
SPlank.Location = new Point3D( X + (SPlank.X - old.X), Y + (SPlank.Y - old.Y), Z + (SPlank.Z - old.Z ) );
}
public override void OnMapChange()
{
if ( m_TillerMan != null )
m_TillerMan.Map = Map;
if ( TillerMan != null )
TillerMan.Map = Map;
if ( m_Hold != null )
m_Hold.Map = Map;
if ( Hold != null )
Hold.Map = Map;
if ( m_PPlank != null )
m_PPlank.Map = Map;
if ( PPlank != null )
PPlank.Map = Map;
if ( m_SPlank != null )
m_SPlank.Map = Map;
if ( SPlank != null )
SPlank.Map = Map;
}
public bool CanCommand( Mobile m )
@ -429,10 +391,10 @@ namespace Server.Multis
public bool CheckKey( uint keyValue )
{
if ( m_SPlank != null && m_SPlank.KeyValue == keyValue )
if ( SPlank != null && SPlank.KeyValue == keyValue )
return true;
if ( m_PPlank != null && m_PPlank.KeyValue == keyValue )
if ( PPlank != null && PPlank.KeyValue == keyValue )
return true;
return false;
@ -488,7 +450,7 @@ namespace Server.Multis
{
m_DecayTime = DateTime.UtcNow + BoatDecayDelay;
m_TillerMan?.InvalidateProperties();
TillerMan?.InvalidateProperties();
}
private class DecayTimer : Timer
@ -543,20 +505,20 @@ namespace Server.Multis
if ( CheckDecay() )
return false;
if ( m_Anchored )
if ( Anchored )
{
if ( message )
m_TillerMan?.Say( 501445 ); // Ar, the anchor was already dropped sir.
TillerMan?.Say( 501445 ); // Ar, the anchor was already dropped sir.
return false;
}
StopMove( false );
m_Anchored = true;
Anchored = true;
if ( message )
m_TillerMan?.Say( 501444 ); // Ar, anchor dropped sir.
TillerMan?.Say( 501444 ); // Ar, anchor dropped sir.
return true;
}
@ -566,18 +528,18 @@ namespace Server.Multis
if ( CheckDecay() )
return false;
if ( !m_Anchored )
if ( !Anchored )
{
if ( message )
m_TillerMan?.Say( 501447 ); // Ar, the anchor has not been dropped sir.
TillerMan?.Say( 501447 ); // Ar, the anchor has not been dropped sir.
return false;
}
m_Anchored = false;
Anchored = false;
if ( message )
m_TillerMan?.Say( 501446 ); // Ar, anchor raised sir.
TillerMan?.Say( 501446 ); // Ar, anchor raised sir.
return true;
}
@ -594,7 +556,7 @@ namespace Server.Multis
if ( StartMove( dir, speed, clientSpeed, interval, false, true ) )
{
m_TillerMan?.Say( 501429 ); // Aye aye sir.
TillerMan?.Say( 501429 ); // Aye aye sir.
return true;
}
@ -613,7 +575,7 @@ namespace Server.Multis
if ( StartMove( dir, speed, 0x1, interval, true, true ) )
{
m_TillerMan?.Say( 501429 ); // Aye aye sir.
TillerMan?.Say( 501429 ); // Aye aye sir.
return true;
}
@ -626,14 +588,14 @@ namespace Server.Multis
if ( CheckDecay() )
return;
if ( from.AccessLevel < AccessLevel.GameMaster && from != m_Owner )
if ( from.AccessLevel < AccessLevel.GameMaster && from != Owner )
{
m_TillerMan?.Say( Utility.Random( 1042876, 4 ) ); // Arr, don't do that! | Arr, leave me alone! | Arr, watch what thour'rt doing, matey! | Arr! Do that again and Ill throw ye overhead!
TillerMan?.Say( Utility.Random( 1042876, 4 ) ); // Arr, don't do that! | Arr, leave me alone! | Arr, watch what thour'rt doing, matey! | Arr! Do that again and Ill throw ye overhead!
return;
}
m_TillerMan?.Say( 502580 ); // What dost thou wish to name thy ship?
TillerMan?.Say( 502580 ); // What dost thou wish to name thy ship?
from.Prompt = new RenameBoatPrompt( this );
}
@ -643,16 +605,16 @@ namespace Server.Multis
if ( Deleted || CheckDecay() )
return;
if ( from.AccessLevel < AccessLevel.GameMaster && from != m_Owner )
if ( from.AccessLevel < AccessLevel.GameMaster && from != Owner )
{
m_TillerMan?.Say( 1042880 ); // Arr! Only the owner of the ship may change its name!
TillerMan?.Say( 1042880 ); // Arr! Only the owner of the ship may change its name!
return;
}
if ( !from.Alive )
{
m_TillerMan?.Say( 502582 ); // You appear to be dead.
TillerMan?.Say( 502582 ); // You appear to be dead.
return;
}
@ -676,13 +638,13 @@ namespace Server.Multis
return DryDockResult.Dead;
Container pack = from.Backpack;
if ( (m_SPlank == null || !Key.ContainsKey( pack, m_SPlank.KeyValue )) && (m_PPlank == null || !Key.ContainsKey( pack, m_PPlank.KeyValue )) )
if ( (SPlank == null || !Key.ContainsKey( pack, SPlank.KeyValue )) && (PPlank == null || !Key.ContainsKey( pack, PPlank.KeyValue )) )
return DryDockResult.NoKey;
if ( !m_Anchored )
if ( !Anchored )
return DryDockResult.NotAnchored;
if ( m_Hold != null && m_Hold.Items.Count > 0 )
if ( Hold != null && Hold.Items.Count > 0 )
return DryDockResult.Hold;
Map map = Map;
@ -760,16 +722,16 @@ namespace Server.Multis
if ( CheckDecay() )
return;
if ( e.Mobile.AccessLevel < AccessLevel.GameMaster && e.Mobile != m_Owner )
if ( e.Mobile.AccessLevel < AccessLevel.GameMaster && e.Mobile != Owner )
{
m_TillerMan?.Say( 1042880 ); // Arr! Only the owner of the ship may change its name!
TillerMan?.Say( 1042880 ); // Arr! Only the owner of the ship may change its name!
return;
}
if ( !e.Mobile.Alive )
{
m_TillerMan?.Say( 502582 ); // You appear to be dead.
TillerMan?.Say( 502582 ); // You appear to be dead.
return;
}
@ -795,18 +757,18 @@ namespace Server.Multis
if ( m_ShipName == newName )
{
m_TillerMan?.Say( 502531 ); // Yes, sir.
TillerMan?.Say( 502531 ); // Yes, sir.
return;
}
ShipName = newName;
if ( m_TillerMan != null && m_ShipName != null )
m_TillerMan.Say( 1042885, m_ShipName ); // This ship is now called the ~1_NEW_SHIP_NAME~.
if ( TillerMan != null && m_ShipName != null )
TillerMan.Say( 1042885, m_ShipName ); // This ship is now called the ~1_NEW_SHIP_NAME~.
else
{
m_TillerMan?.Say( 502534 ); // This ship now has no name.
TillerMan?.Say( 502534 ); // This ship now has no name.
}
}
@ -815,41 +777,41 @@ namespace Server.Multis
if ( CheckDecay() )
return;
if ( m.AccessLevel < AccessLevel.GameMaster && m != m_Owner )
if ( m.AccessLevel < AccessLevel.GameMaster && m != Owner )
{
m_TillerMan?.Say( 1042880 ); // Arr! Only the owner of the ship may change its name!
TillerMan?.Say( 1042880 ); // Arr! Only the owner of the ship may change its name!
return;
}
if ( !m.Alive )
{
m_TillerMan?.Say( 502582 ); // You appear to be dead.
TillerMan?.Say( 502582 ); // You appear to be dead.
return;
}
if ( m_ShipName == null )
{
m_TillerMan?.Say( 502526 ); // Ar, this ship has no name.
TillerMan?.Say( 502526 ); // Ar, this ship has no name.
return;
}
ShipName = null;
m_TillerMan?.Say( 502534 ); // This ship now has no name.
TillerMan?.Say( 502534 ); // This ship now has no name.
}
public void GiveName( Mobile m )
{
if ( m_TillerMan == null || CheckDecay() )
if ( TillerMan == null || CheckDecay() )
return;
if ( m_ShipName == null )
m_TillerMan.Say( 502526 ); // Ar, this ship has no name.
TillerMan.Say( 502526 ); // Ar, this ship has no name.
else
m_TillerMan.Say( 1042881, m_ShipName ); // This is the ~1_BOAT_NAME~.
TillerMan.Say( 1042881, m_ShipName ); // This is the ~1_BOAT_NAME~.
}
public void GiveNavPoint()
@ -1052,10 +1014,10 @@ namespace Server.Multis
if ( CheckDecay() )
return false;
if ( m_Anchored )
if ( Anchored )
{
if ( message )
m_TillerMan.Say( 501419 ); // Ar, the anchor is down sir!
TillerMan.Say( 501419 ); // Ar, the anchor is down sir!
return false;
}
@ -1088,10 +1050,10 @@ namespace Server.Multis
if ( CheckDecay() )
return false;
if ( m_Anchored )
if ( Anchored )
{
if ( message )
m_TillerMan.Say( 501419 ); // Ar, the anchor is down sir!
TillerMan.Say( 501419 ); // Ar, the anchor is down sir!
return false;
}
@ -1101,7 +1063,7 @@ namespace Server.Multis
return true;
}
if ( message )
m_TillerMan.Say( 501423 ); // Ar, can't turn sir.
TillerMan.Say( 501423 ); // Ar, can't turn sir.
return false;
}
@ -1131,18 +1093,18 @@ namespace Server.Multis
if ( CheckDecay() )
return false;
if ( m_Anchored )
if ( Anchored )
{
if ( message )
m_TillerMan?.Say( 501419 ); // Ar, the anchor is down sir!
TillerMan?.Say( 501419 ); // Ar, the anchor is down sir!
return false;
}
m_Moving = dir;
m_Speed = speed;
Moving = dir;
Speed = speed;
m_ClientSpeed = clientSpeed;
m_Order = BoatOrder.Move;
Order = BoatOrder.Move;
m_MoveTimer?.Stop();
@ -1160,19 +1122,19 @@ namespace Server.Multis
if ( m_MoveTimer == null )
{
if ( message )
m_TillerMan?.Say( 501443 ); // Er, the ship is not moving sir.
TillerMan?.Say( 501443 ); // Er, the ship is not moving sir.
return false;
}
m_Moving = Direction.North;
m_Speed = 0;
Moving = Direction.North;
Speed = 0;
m_ClientSpeed = 0;
m_MoveTimer.Stop();
m_MoveTimer = null;
if ( message )
m_TillerMan?.Say( 501429 ); // Aye aye sir.
TillerMan?.Say( 501429 ); // Aye aye sir.
return true;
}
@ -1271,16 +1233,16 @@ namespace Server.Multis
if ( base.Contains( x, y ) )
return true;
if ( m_TillerMan != null && x == m_TillerMan.X && y == m_TillerMan.Y )
if ( TillerMan != null && x == TillerMan.X && y == TillerMan.Y )
return true;
if ( m_Hold != null && x == m_Hold.X && y == m_Hold.Y )
if ( Hold != null && x == Hold.X && y == Hold.Y )
return true;
if ( m_PPlank != null && x == m_PPlank.X && y == m_PPlank.Y )
if ( PPlank != null && x == PPlank.X && y == PPlank.Y )
return true;
if ( m_SPlank != null && x == m_SPlank.X && y == m_SPlank.Y )
if ( SPlank != null && x == SPlank.X && y == SPlank.Y )
return true;
return false;
@ -1335,8 +1297,8 @@ namespace Server.Multis
if ( Order == BoatOrder.Move )
{
dir = m_Moving;
speed = m_Speed;
dir = Moving;
speed = Speed;
clientSpeed = m_ClientSpeed;
}
else if ( MapItem == null || MapItem.Deleted )
@ -1417,10 +1379,10 @@ namespace Server.Multis
if ( map == null || Deleted || CheckDecay() )
return false;
if ( m_Anchored )
if ( Anchored )
{
if ( message )
m_TillerMan?.Say( 501419 ); // Ar, the anchor is down sir!
TillerMan?.Say( 501419 ); // Ar, the anchor is down sir!
return false;
}
@ -1436,7 +1398,7 @@ namespace Server.Multis
if ( i == 1 )
{
if ( message )
m_TillerMan?.Say( 501424 ); // Ar, we've stopped sir.
TillerMan?.Say( 501424 ); // Ar, we've stopped sir.
return false;
}
@ -1475,7 +1437,7 @@ namespace Server.Multis
if ( !CanFit( new Point3D( newX + (j * rx), newY + (j * ry), Z ), Map, ItemID ) )
{
if ( message )
m_TillerMan?.Say( 501424 ); // Ar, we've stopped sir.
TillerMan?.Say( 501424 ); // Ar, we've stopped sir.
return false;
}
@ -1494,10 +1456,10 @@ namespace Server.Multis
{
List<IEntity> toMove = GetMovingEntities();
SafeAdd( m_TillerMan, toMove );
SafeAdd( m_Hold, toMove );
SafeAdd( m_PPlank, toMove );
SafeAdd( m_SPlank, toMove );
SafeAdd( TillerMan, toMove );
SafeAdd( Hold, toMove );
SafeAdd( PPlank, toMove );
SafeAdd( SPlank, toMove );
// Packet must be sent before actual locations are changed
foreach ( NetState ns in Map.GetClientsInRange( Location, GetMaxUpdateRange() ) )
@ -1634,27 +1596,27 @@ namespace Server.Multis
m_Facing = facing;
m_TillerMan?.SetFacing( facing );
TillerMan?.SetFacing( facing );
m_Hold?.SetFacing( facing );
Hold?.SetFacing( facing );
m_PPlank?.SetFacing( facing );
PPlank?.SetFacing( facing );
m_SPlank?.SetFacing( facing );
SPlank?.SetFacing( facing );
List<IEntity> toMove = GetMovingEntities();
toMove.Add( m_PPlank );
toMove.Add( m_SPlank );
toMove.Add( PPlank );
toMove.Add( SPlank );
int xOffset = 0, yOffset = 0;
Movement.Movement.Offset( facing, ref xOffset, ref yOffset );
if ( m_TillerMan != null )
m_TillerMan.Location = new Point3D( X + (xOffset * TillerManDistance) + (facing == Direction.North ? 1 : 0), Y + (yOffset * TillerManDistance), m_TillerMan.Z );
if ( TillerMan != null )
TillerMan.Location = new Point3D( X + (xOffset * TillerManDistance) + (facing == Direction.North ? 1 : 0), Y + (yOffset * TillerManDistance), TillerMan.Z );
if ( m_Hold != null )
m_Hold.Location = new Point3D( X + (xOffset * HoldDistance), Y + (yOffset * HoldDistance), m_Hold.Z );
if ( Hold != null )
Hold.Location = new Point3D( X + (xOffset * HoldDistance), Y + (yOffset * HoldDistance), Hold.Z );
int count = (int)(m_Facing - old) & 0x7;
count /= 2;
@ -1708,8 +1670,8 @@ namespace Server.Multis
public static void UpdateAllComponents()
{
for ( int i = m_Instances.Count - 1; i >= 0; --i )
m_Instances[i].UpdateComponents();
for ( int i = Boats.Count - 1; i >= 0; --i )
Boats[i].UpdateComponents();
}
public static void Initialize()

View file

@ -7,18 +7,11 @@ namespace Server.Multis
{
public abstract class BaseBoatDeed : Item
{
private int m_MultiID;
private Point3D m_Offset;
[CommandProperty( AccessLevel.GameMaster )]
public int MultiID { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int MultiID{ get => m_MultiID;
set => m_MultiID = value;
}
[CommandProperty( AccessLevel.GameMaster )]
public Point3D Offset{ get => m_Offset;
set => m_Offset = value;
}
public Point3D Offset { get; set; }
public BaseBoatDeed( int id, Point3D offset ) : base( 0x14F2 )
{
@ -27,8 +20,8 @@ namespace Server.Multis
if ( !Core.AOS )
LootType = LootType.Newbied;
m_MultiID = id;
m_Offset = offset;
MultiID = id;
Offset = offset;
}
public BaseBoatDeed( Serial serial ) : base( serial )
@ -41,8 +34,8 @@ namespace Server.Multis
writer.Write( (int) 0 ); // version
writer.Write( m_MultiID );
writer.Write( m_Offset );
writer.Write( MultiID );
writer.Write( Offset );
}
public override void Deserialize( GenericReader reader )
@ -55,8 +48,8 @@ namespace Server.Multis
{
case 0:
{
m_MultiID = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
MultiID = reader.ReadInt();
Offset = reader.ReadPoint3D();
break;
}
@ -124,7 +117,7 @@ namespace Server.Multis
if ( boat == null )
return;
p = new Point3D( p.X - m_Offset.X, p.Y - m_Offset.Y, p.Z - m_Offset.Z );
p = new Point3D( p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z );
if ( BaseBoat.IsValidLocation( p, map ) && boat.CanFit( p, map, boat.ItemID ) )
{

View file

@ -6,19 +6,13 @@ namespace Server.Multis
{
public abstract class BaseDockedBoat : Item
{
private int m_MultiID;
private Point3D m_Offset;
private string m_ShipName;
[CommandProperty( AccessLevel.GameMaster )]
public int MultiID{ get => m_MultiID;
set => m_MultiID = value;
}
public int MultiID { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public Point3D Offset{ get => m_Offset;
set => m_Offset = value;
}
public Point3D Offset { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public string ShipName{ get => m_ShipName;
@ -29,8 +23,8 @@ namespace Server.Multis
Weight = 1.0;
LootType = LootType.Blessed;
m_MultiID = id;
m_Offset = offset;
MultiID = id;
Offset = offset;
m_ShipName = boat.ShipName;
}
@ -45,8 +39,8 @@ namespace Server.Multis
writer.Write( (int) 1 ); // version
writer.Write( m_MultiID );
writer.Write( m_Offset );
writer.Write( MultiID );
writer.Write( Offset );
writer.Write( m_ShipName );
}
@ -61,8 +55,8 @@ namespace Server.Multis
case 1:
case 0:
{
m_MultiID = reader.ReadInt();
m_Offset = reader.ReadPoint3D();
MultiID = reader.ReadInt();
Offset = reader.ReadPoint3D();
m_ShipName = reader.ReadString();
if ( version == 0 )
@ -134,7 +128,7 @@ namespace Server.Multis
if ( boat == null )
return;
p = new Point3D( p.X - m_Offset.X, p.Y - m_Offset.Y, p.Z - m_Offset.Z );
p = new Point3D( p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z );
if ( BaseBoat.IsValidLocation( p, map ) && boat.CanFit( p, map, boat.ItemID ) && map != Map.Ilshenar && map != Map.Malas )
{

View file

@ -8,19 +8,14 @@ namespace Server.Items
public class Plank : Item, ILockable
{
private BaseBoat m_Boat;
private PlankSide m_Side;
private bool m_Locked;
private uint m_KeyValue;
private Timer m_CloseTimer;
public Plank( BaseBoat boat, PlankSide side, uint keyValue ) : base( 0x3EB1 + (int)side )
{
m_Boat = boat;
m_Side = side;
m_KeyValue = keyValue;
m_Locked = true;
Boat = boat;
Side = side;
KeyValue = keyValue;
Locked = true;
Movable = false;
}
@ -35,10 +30,10 @@ namespace Server.Items
writer.Write( (int) 0 );//version
writer.Write( m_Boat );
writer.Write( (int) m_Side );
writer.Write( m_Locked );
writer.Write( m_KeyValue );
writer.Write( Boat );
writer.Write( (int) Side );
writer.Write( Locked );
writer.Write( KeyValue );
}
public override void Deserialize( GenericReader reader )
@ -51,12 +46,12 @@ namespace Server.Items
{
case 0:
{
m_Boat = reader.ReadItem() as BaseBoat;
m_Side = (PlankSide) reader.ReadInt();
m_Locked = reader.ReadBool();
m_KeyValue = reader.ReadUInt();
Boat = reader.ReadItem() as BaseBoat;
Side = (PlankSide) reader.ReadInt();
Locked = reader.ReadBool();
KeyValue = reader.ReadUInt();
if ( m_Boat == null )
if ( Boat == null )
Delete();
break;
@ -71,30 +66,22 @@ namespace Server.Items
}
[CommandProperty( AccessLevel.GameMaster )]
public BaseBoat Boat{ get => m_Boat;
set => m_Boat = value;
}
public BaseBoat Boat { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public PlankSide Side{ get => m_Side;
set => m_Side = value;
}
public PlankSide Side { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool Locked{ get => m_Locked;
set => m_Locked = value;
}
public bool Locked { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public uint KeyValue{ get => m_KeyValue;
set => m_KeyValue = value;
}
public uint KeyValue { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool IsOpen => ( ItemID == 0x3ED5 || ItemID == 0x3ED4 || ItemID == 0x3E84 || ItemID == 0x3E89 );
[CommandProperty( AccessLevel.GameMaster )]
public bool Starboard => ( m_Side == PlankSide.Starboard );
public bool Starboard => ( Side == PlankSide.Starboard );
public void SetFacing( Direction dir )
{
@ -138,7 +125,7 @@ namespace Server.Items
case 0x3E85: ItemID = 0x3E84; break;
}
m_Boat?.Refresh();
Boat?.Refresh();
}
public override bool OnMoveOver( Mobile from )
@ -148,7 +135,7 @@ namespace Server.Items
if ( from is BaseFactionGuard )
return false;
if ( (from.Direction & Direction.Running) != 0 || (m_Boat != null && !m_Boat.Contains( from )) )
if ( (from.Direction & Direction.Running) != 0 || (Boat != null && !Boat.Contains( from )) )
return true;
Map map = Map;
@ -238,7 +225,7 @@ namespace Server.Items
case 0x3E84: ItemID = 0x3E85; break;
}
m_Boat?.Refresh();
Boat?.Refresh();
}
public override void OnDoubleClickDead( Mobile from )
@ -248,12 +235,12 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( m_Boat == null )
if ( Boat == null )
return;
if ( from.InRange( GetWorldLocation(), 8 ) )
{
if ( m_Boat.Contains( from ) )
if ( Boat.Contains( from ) )
{
if ( IsOpen )
Close();

View file

@ -117,9 +117,8 @@ namespace Server.Multis
}
private ColumnInfo[] m_Columns;
private DataRecord[] m_Records;
public DataRecord[] Records => m_Records;
public DataRecord[] Records { get; }
public int GetColumnID( string name )
{
@ -174,7 +173,7 @@ namespace Server.Multis
records.Add( new DataRecord( this, data ) );
}
m_Records = records.ToArray();
Records = records.ToArray();
}
}
@ -196,16 +195,14 @@ namespace Server.Multis
public class DataRecord
{
private Spreadsheet m_Spreadsheet;
private object[] m_Data;
public Spreadsheet Spreadsheet { get; }
public Spreadsheet Spreadsheet => m_Spreadsheet;
public object[] Data => m_Data;
public object[] Data { get; }
public DataRecord( Spreadsheet ss, object[] data )
{
m_Spreadsheet = ss;
m_Data = data;
Spreadsheet = ss;
Data = data;
}
public int GetInt32( string name )
@ -231,7 +228,7 @@ namespace Server.Multis
return this[name] as string;
}
public object this[string name] => this[m_Spreadsheet.GetColumnID( name )];
public object this[string name] => this[Spreadsheet.GetColumnID( name )];
public object this[int id]
{
@ -240,7 +237,7 @@ namespace Server.Multis
if ( id < 0 )
return null;
return m_Data[id];
return Data[id];
}
}
}

View file

@ -42,30 +42,19 @@ namespace Server.Multis.Deeds
public abstract class HouseDeed : Item
{
private int m_MultiID;
private Point3D m_Offset;
[CommandProperty( AccessLevel.GameMaster )]
public int MultiID { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int MultiID
{
get => m_MultiID;
set => m_MultiID = value;
}
[CommandProperty( AccessLevel.GameMaster )]
public Point3D Offset
{
get => m_Offset;
set => m_Offset = value;
}
public Point3D Offset { get; set; }
public HouseDeed( int id, Point3D offset ) : base( 0x14F0 )
{
Weight = 1.0;
LootType = LootType.Newbied;
m_MultiID = id;
m_Offset = offset;
MultiID = id;
Offset = offset;
}
public HouseDeed( Serial serial ) : base( serial )
@ -78,9 +67,9 @@ namespace Server.Multis.Deeds
writer.Write( (int) 1 ); // version
writer.Write( m_Offset );
writer.Write( Offset );
writer.Write( m_MultiID );
writer.Write( MultiID );
}
public override void Deserialize( GenericReader reader )
@ -93,13 +82,13 @@ namespace Server.Multis.Deeds
{
case 1:
{
m_Offset = reader.ReadPoint3D();
Offset = reader.ReadPoint3D();
goto case 0;
}
case 0:
{
m_MultiID = reader.ReadInt();
MultiID = reader.ReadInt();
break;
}
@ -148,8 +137,8 @@ namespace Server.Multis.Deeds
else
{
ArrayList toMove;
Point3D center = new Point3D( p.X - m_Offset.X, p.Y - m_Offset.Y, p.Z - m_Offset.Z );
HousePlacementResult res = HousePlacement.Check( from, m_MultiID, center, out toMove );
Point3D center = new Point3D( p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z );
HousePlacementResult res = HousePlacement.Check( from, MultiID, center, out toMove );
switch ( res )
{

View file

@ -51,17 +51,14 @@ namespace Server.Multis
public class DecayStageInfo
{
private TimeSpan m_MinDuration;
private TimeSpan m_MaxDuration;
public TimeSpan MinDuration { get; }
public TimeSpan MinDuration => m_MinDuration;
public TimeSpan MaxDuration => m_MaxDuration;
public TimeSpan MaxDuration { get; }
public DecayStageInfo( TimeSpan min, TimeSpan max )
{
m_MinDuration = min;
m_MaxDuration = max;
MinDuration = min;
MaxDuration = max;
}
}
}

View file

@ -29,29 +29,20 @@ namespace Server.Multis
private DesignState m_Current; // State which is currently visible.
private DesignState m_Design; // State of current design.
private DesignState m_Backup; // State at last user backup.
private Item m_SignHanger; // Item hanging the sign.
private Item m_Signpost; // Item supporting the hanger.
private int m_SignpostGraphic; // ItemID number of the chosen signpost.
private int m_LastRevision; // Latest revision number.
private List<Item> m_Fixtures; // List of fixtures (teleporters and doors) associated with this house.
private FoundationType m_Type; // Graphic type of this foundation.
private Mobile m_Customizer; // Who is currently customizing this -or- null if not customizing.
public FoundationType Type { get => m_Type;
set => m_Type = value;
}
public int LastRevision { get => m_LastRevision;
set => m_LastRevision = value;
}
public List<Item> Fixtures => m_Fixtures;
public Item SignHanger => m_SignHanger;
public Item Signpost => m_Signpost;
public int SignpostGraphic { get => m_SignpostGraphic;
set => m_SignpostGraphic = value;
}
public Mobile Customizer { get => m_Customizer;
set => m_Customizer = value;
}
public FoundationType Type { get; set; }
public int LastRevision { get; set; }
public List<Item> Fixtures { get; private set; }
public Item SignHanger { get; private set; }
public Item Signpost { get; private set; }
public int SignpostGraphic { get; set; }
public Mobile Customizer { get; set; }
public override bool IsAosRules => true;
@ -61,7 +52,7 @@ namespace Server.Multis
public bool IsFixture( Item item )
{
return (m_Fixtures != null && m_Fixtures.Contains( item ));
return (Fixtures != null && Fixtures.Contains( item ));
}
public override MultiComponentList Components
@ -124,21 +115,21 @@ namespace Server.Multis
{
base.OnAfterDelete();
m_SignHanger?.Delete();
SignHanger?.Delete();
m_Signpost?.Delete();
Signpost?.Delete();
if ( m_Fixtures == null )
if ( Fixtures == null )
return;
for( int i = 0; i < m_Fixtures.Count; ++i )
for( int i = 0; i < Fixtures.Count; ++i )
{
Item item = m_Fixtures[i];
Item item = Fixtures[i];
item?.Delete();
}
m_Fixtures.Clear();
Fixtures.Clear();
}
public override void OnLocationChange( Point3D oldLocation )
@ -149,16 +140,16 @@ namespace Server.Multis
int y = Location.Y - oldLocation.Y;
int z = Location.Z - oldLocation.Z;
m_SignHanger?.MoveToWorld( new Point3D( m_SignHanger.X + x, m_SignHanger.Y + y, m_SignHanger.Z + z ), Map );
SignHanger?.MoveToWorld( new Point3D( SignHanger.X + x, SignHanger.Y + y, SignHanger.Z + z ), Map );
m_Signpost?.MoveToWorld( new Point3D( m_Signpost.X + x, m_Signpost.Y + y, m_Signpost.Z + z ), Map );
Signpost?.MoveToWorld( new Point3D( Signpost.X + x, Signpost.Y + y, Signpost.Z + z ), Map );
if ( m_Fixtures == null )
if ( Fixtures == null )
return;
for( int i = 0; i < m_Fixtures.Count; ++i )
for( int i = 0; i < Fixtures.Count; ++i )
{
Item item = m_Fixtures[i];
Item item = Fixtures[i];
if ( Doors.Contains( item ) )
continue;
@ -171,39 +162,39 @@ namespace Server.Multis
{
base.OnMapChange();
if ( m_SignHanger != null )
m_SignHanger.Map = Map;
if ( SignHanger != null )
SignHanger.Map = Map;
if ( m_Signpost != null )
m_Signpost.Map = Map;
if ( Signpost != null )
Signpost.Map = Map;
if ( m_Fixtures == null )
if ( Fixtures == null )
return;
for( int i = 0; i < m_Fixtures.Count; ++i )
m_Fixtures[i].Map = Map;
for( int i = 0; i < Fixtures.Count; ++i )
Fixtures[i].Map = Map;
}
public void ClearFixtures( Mobile from )
{
if ( m_Fixtures == null )
if ( Fixtures == null )
return;
RemoveKeys( from );
for( int i = 0; i < m_Fixtures.Count; ++i )
for( int i = 0; i < Fixtures.Count; ++i )
{
m_Fixtures[i].Delete();
Doors.Remove( m_Fixtures[i] );
Fixtures[i].Delete();
Doors.Remove( Fixtures[i] );
}
m_Fixtures.Clear();
Fixtures.Clear();
}
public void AddFixtures( Mobile from, MultiTileEntry[] list )
{
if ( m_Fixtures == null )
m_Fixtures = new List<Item>();
if ( Fixtures == null )
Fixtures = new List<Item>();
uint keyValue = 0;
@ -401,22 +392,22 @@ namespace Server.Multis
door.KeyValue = keyValue;
AddDoor( door, mte.m_OffsetX, mte.m_OffsetY, mte.m_OffsetZ );
m_Fixtures.Add( door );
Fixtures.Add( door );
}
}
}
for( int i = 0; i < m_Fixtures.Count; ++i )
for( int i = 0; i < Fixtures.Count; ++i )
{
Item fixture = m_Fixtures[i];
Item fixture = Fixtures[i];
if ( fixture is HouseTeleporter )
{
HouseTeleporter tp = (HouseTeleporter)fixture;
for( int j = 1; j <= m_Fixtures.Count; ++j )
for( int j = 1; j <= Fixtures.Count; ++j )
{
HouseTeleporter check = m_Fixtures[(i + j) % m_Fixtures.Count] as HouseTeleporter;
HouseTeleporter check = Fixtures[(i + j) % Fixtures.Count] as HouseTeleporter;
if ( check != null && check.ItemID == tp.ItemID )
{
@ -452,9 +443,9 @@ namespace Server.Multis
case DoorFacing.WestSS: linkFacing = DoorFacing.WestSN; xOffset = 0; yOffset = -1; break;
}
for( int j = i + 1; j < m_Fixtures.Count; ++j )
for( int j = i + 1; j < Fixtures.Count; ++j )
{
BaseHouseDoor check = m_Fixtures[j] as BaseHouseDoor;
BaseHouseDoor check = Fixtures[j] as BaseHouseDoor;
if ( check != null && check.Link == null && check.Facing == linkFacing && (check.X - door.X) == xOffset && (check.Y - door.Y) == yOffset && (check.Z == door.Z) )
{
@ -477,7 +468,7 @@ namespace Server.Multis
public void AddFixture( Item item, MultiTileEntry mte )
{
m_Fixtures.Add( item );
Fixtures.Add( item );
item.MoveToWorld( new Point3D( X + mte.m_OffsetX, Y + mte.m_OffsetY, Z + mte.m_OffsetZ ), Map );
}
@ -555,7 +546,7 @@ namespace Server.Multis
int yCenter = mcl.Center.Y;
int y = mcl.Height - 1;
ApplyFoundation( m_Type, mcl );
ApplyFoundation( Type, mcl );
for( int x = 1; x < mcl.Width; ++x )
mcl.Add( 0x751, x - xCenter, y - yCenter, 0 );
@ -584,19 +575,19 @@ namespace Server.Multis
if ( CheckWall( mcl, x, y ) )
{
m_Signpost?.Delete();
Signpost?.Delete();
m_Signpost = null;
Signpost = null;
}
else if ( m_Signpost == null )
else if ( Signpost == null )
{
m_Signpost = new Static( m_SignpostGraphic );
m_Signpost.MoveToWorld( new Point3D( X + x, Y + y, Z + 7 ), Map );
Signpost = new Static( SignpostGraphic );
Signpost.MoveToWorld( new Point3D( X + x, Y + y, Z + 7 ), Map );
}
else
{
m_Signpost.ItemID = m_SignpostGraphic;
m_Signpost.MoveToWorld( new Point3D( X + x, Y + y, Z + 7 ), Map );
Signpost.ItemID = SignpostGraphic;
Signpost.MoveToWorld( new Point3D( X + x, Y + y, Z + 7 ), Map );
}
}
@ -624,15 +615,15 @@ namespace Server.Multis
public HouseFoundation( Mobile owner, int multiID, int maxLockdowns, int maxSecures )
: base( multiID, owner, maxLockdowns, maxSecures )
{
m_SignpostGraphic = 9;
SignpostGraphic = 9;
m_Fixtures = new List<Item>();
Fixtures = new List<Item>();
int x = Components.Min.X;
int y = Components.Height - 1 - Components.Center.Y;
m_SignHanger = new Static( 0xB98 );
m_SignHanger.MoveToWorld( new Point3D( X + x, Y + y, Z + 7 ), Map );
SignHanger = new Static( 0xB98 );
SignHanger.MoveToWorld( new Point3D( X + x, Y + y, Z + 7 ), Map );
CheckSignpost();
@ -697,15 +688,15 @@ namespace Server.Multis
{
writer.Write( (int)5 ); // version
writer.Write( m_Signpost );
writer.Write( (int)m_SignpostGraphic );
writer.Write( Signpost );
writer.Write( (int)SignpostGraphic );
writer.Write( (int)m_Type );
writer.Write( (int)Type );
writer.Write( m_SignHanger );
writer.Write( SignHanger );
writer.Write( (int)m_LastRevision );
writer.Write( m_Fixtures, true );
writer.Write( (int)LastRevision );
writer.Write( Fixtures, true );
CurrentState.Serialize( writer );
DesignState.Serialize( writer );
@ -727,20 +718,20 @@ namespace Server.Multis
case 5:
case 4:
{
m_Signpost = reader.ReadItem();
m_SignpostGraphic = reader.ReadInt();
Signpost = reader.ReadItem();
SignpostGraphic = reader.ReadInt();
goto case 3;
}
case 3:
{
m_Type = (FoundationType)reader.ReadInt();
Type = (FoundationType)reader.ReadInt();
goto case 2;
}
case 2:
{
m_SignHanger = reader.ReadItem();
SignHanger = reader.ReadItem();
goto case 1;
}
@ -754,13 +745,13 @@ namespace Server.Multis
case 0:
{
if ( version < 3 )
m_Type = FoundationType.Stone;
Type = FoundationType.Stone;
if ( version < 4 )
m_SignpostGraphic = 9;
SignpostGraphic = 9;
m_LastRevision = reader.ReadInt();
m_Fixtures = reader.ReadStrongItemList();
LastRevision = reader.ReadInt();
Fixtures = reader.ReadStrongItemList();
m_Current = new DesignState( this, reader );
m_Design = new DesignState( this, reader );
@ -775,7 +766,7 @@ namespace Server.Multis
public bool IsHiddenToCustomizer( Item item )
{
return ( item == m_Signpost || item == m_SignHanger || item == Sign || IsFixture( item ) );
return ( item == Signpost || item == SignHanger || item == Sign || IsFixture( item ) );
}
public static void Initialize()
@ -1677,10 +1668,6 @@ namespace Server.Multis
public class DesignState
{
private HouseFoundation m_Foundation;
private MultiComponentList m_Components;
private MultiTileEntry[] m_Fixtures;
private int m_Revision;
private Packet m_PacketCache;
public Packet PacketCache
@ -1697,34 +1684,35 @@ namespace Server.Multis
}
}
public HouseFoundation Foundation => m_Foundation;
public MultiComponentList Components => m_Components;
public MultiTileEntry[] Fixtures => m_Fixtures;
public int Revision { get => m_Revision;
set => m_Revision = value;
}
public HouseFoundation Foundation { get; }
public MultiComponentList Components { get; }
public MultiTileEntry[] Fixtures { get; private set; }
public int Revision { get; set; }
public DesignState( HouseFoundation foundation, MultiComponentList components )
{
m_Foundation = foundation;
m_Components = components;
m_Fixtures = new MultiTileEntry[0];
Foundation = foundation;
Components = components;
Fixtures = new MultiTileEntry[0];
}
public DesignState( DesignState toCopy )
{
m_Foundation = toCopy.m_Foundation;
m_Components = new MultiComponentList( toCopy.m_Components );
m_Revision = toCopy.m_Revision;
m_Fixtures = new MultiTileEntry[toCopy.m_Fixtures.Length];
Foundation = toCopy.Foundation;
Components = new MultiComponentList( toCopy.Components );
Revision = toCopy.Revision;
Fixtures = new MultiTileEntry[toCopy.Fixtures.Length];
for( int i = 0; i < m_Fixtures.Length; ++i )
m_Fixtures[i] = toCopy.m_Fixtures[i];
for( int i = 0; i < Fixtures.Length; ++i )
Fixtures[i] = toCopy.Fixtures[i];
}
public DesignState( HouseFoundation foundation, GenericReader reader )
{
m_Foundation = foundation;
Foundation = foundation;
int version = reader.ReadInt();
@ -1732,22 +1720,22 @@ namespace Server.Multis
{
case 0:
{
m_Components = new MultiComponentList( reader );
Components = new MultiComponentList( reader );
int length = reader.ReadInt();
m_Fixtures = new MultiTileEntry[length];
Fixtures = new MultiTileEntry[length];
for( int i = 0; i < length; ++i )
{
m_Fixtures[i].m_ItemID = reader.ReadUShort();
m_Fixtures[i].m_OffsetX = reader.ReadShort();
m_Fixtures[i].m_OffsetY = reader.ReadShort();
m_Fixtures[i].m_OffsetZ = reader.ReadShort();
m_Fixtures[i].m_Flags = reader.ReadInt();
Fixtures[i].m_ItemID = reader.ReadUShort();
Fixtures[i].m_OffsetX = reader.ReadShort();
Fixtures[i].m_OffsetY = reader.ReadShort();
Fixtures[i].m_OffsetZ = reader.ReadShort();
Fixtures[i].m_Flags = reader.ReadInt();
}
m_Revision = reader.ReadInt();
Revision = reader.ReadInt();
break;
}
@ -1758,13 +1746,13 @@ namespace Server.Multis
{
writer.Write( (int)0 ); // version
m_Components.Serialize( writer );
Components.Serialize( writer );
writer.Write( (int)m_Fixtures.Length );
writer.Write( (int)Fixtures.Length );
for( int i = 0; i < m_Fixtures.Length; ++i )
for( int i = 0; i < Fixtures.Length; ++i )
{
MultiTileEntry ent = m_Fixtures[i];
MultiTileEntry ent = Fixtures[i];
writer.Write( (ushort)ent.m_ItemID );
writer.Write( (short)ent.m_OffsetX );
@ -1773,14 +1761,14 @@ namespace Server.Multis
writer.Write( (int)ent.m_Flags );
}
writer.Write( (int)m_Revision );
writer.Write( (int)Revision );
}
public void OnRevised()
{
lock( this )
{
m_Revision = ++m_Foundation.LastRevision;
Revision = ++Foundation.LastRevision;
m_PacketCache?.Release();
@ -1790,7 +1778,7 @@ namespace Server.Multis
public void SendGeneralInfoTo( NetState state )
{
state?.Send( new DesignStateGeneral( m_Foundation, this ) );
state?.Send( new DesignStateGeneral( Foundation, this ) );
}
public void SendDetailedInfoTo( NetState state )
@ -1800,7 +1788,7 @@ namespace Server.Multis
lock( this )
{
if ( m_PacketCache == null )
DesignStateDetailed.SendDetails( state, m_Foundation, this );
DesignStateDetailed.SendDetails( state, Foundation, this );
else
state.Send( m_PacketCache );
}
@ -1811,21 +1799,21 @@ namespace Server.Multis
{
OnRevised();
for( int i = 0; i < m_Fixtures.Length; ++i )
for( int i = 0; i < Fixtures.Length; ++i )
{
MultiTileEntry mte = m_Fixtures[i];
MultiTileEntry mte = Fixtures[i];
m_Components.Add( mte.m_ItemID, mte.m_OffsetX, mte.m_OffsetY, mte.m_OffsetZ );
Components.Add( mte.m_ItemID, mte.m_OffsetX, mte.m_OffsetY, mte.m_OffsetZ );
}
m_Fixtures = new MultiTileEntry[0];
Fixtures = new MultiTileEntry[0];
}
public void MeltFixtures()
{
OnRevised();
MultiTileEntry[] list = m_Components.List;
MultiTileEntry[] list = Components.List;
int length = 0;
for( int i = list.Length - 1; i >= 0; --i )
@ -1836,7 +1824,7 @@ namespace Server.Multis
++length;
}
m_Fixtures = new MultiTileEntry[length];
Fixtures = new MultiTileEntry[length];
for( int i = list.Length - 1; i >= 0; --i )
{
@ -1844,8 +1832,8 @@ namespace Server.Multis
if ( IsFixture( mte.m_ItemID ) )
{
m_Fixtures[--length] = mte;
m_Components.Remove( mte.m_ItemID, mte.m_OffsetX, mte.m_OffsetY, mte.m_OffsetZ );
Fixtures[--length] = mte;
Components.Remove( mte.m_ItemID, mte.m_OffsetX, mte.m_OffsetY, mte.m_OffsetZ );
}
}
}
@ -1975,31 +1963,26 @@ namespace Server.Multis
public class DesignContext
{
private HouseFoundation m_Foundation;
private int m_Level;
public HouseFoundation Foundation { get; }
public HouseFoundation Foundation => m_Foundation;
public int Level { get => m_Level;
set => m_Level = value;
}
public int MaxLevels => m_Foundation.MaxLevels;
public int Level { get; set; }
public int MaxLevels => Foundation.MaxLevels;
public DesignContext( HouseFoundation foundation )
{
m_Foundation = foundation;
m_Level = 1;
Foundation = foundation;
Level = 1;
}
private static Dictionary<Mobile, DesignContext> m_Table = new Dictionary<Mobile, DesignContext>();
public static Dictionary<Mobile, DesignContext> Table => m_Table;
public static Dictionary<Mobile, DesignContext> Table { get; } = new Dictionary<Mobile, DesignContext>();
public static DesignContext Find( Mobile from )
{
if ( from == null )
return null;
m_Table.TryGetValue( from, out DesignContext d );
Table.TryGetValue( from, out DesignContext d );
return d;
}
@ -2022,7 +2005,7 @@ namespace Server.Multis
DesignContext c = new DesignContext( foundation );
m_Table[from] = c;
Table[from] = c;
if ( from is PlayerMobile )
((PlayerMobile)from).DesignContext = c;
@ -2063,7 +2046,7 @@ namespace Server.Multis
if ( context == null )
return;
m_Table.Remove( from );
Table.Remove( from );
if ( from is PlayerMobile )
((PlayerMobile)from).DesignContext = null;

View file

@ -270,42 +270,39 @@ namespace Server.Items
public class HousePlacementEntry
{
private Type m_Type;
private int m_Description;
private int m_Storage;
private int m_Lockdowns;
private int m_NewStorage;
private int m_NewLockdowns;
private int m_Vendors;
private int m_Cost;
private int m_MultiID;
private Point3D m_Offset;
public Type Type => m_Type;
public Type Type { get; }
public int Description { get; }
public int Description => m_Description;
public int Storage => BaseHouse.NewVendorSystem ? m_NewStorage : m_Storage;
public int Lockdowns => BaseHouse.NewVendorSystem ? m_NewLockdowns : m_Lockdowns;
public int Vendors => m_Vendors;
public int Cost => m_Cost;
public int Vendors { get; }
public int MultiID => m_MultiID;
public Point3D Offset => m_Offset;
public int Cost { get; }
public int MultiID { get; }
public Point3D Offset { get; }
public HousePlacementEntry( Type type, int description, int storage, int lockdowns, int newStorage, int newLockdowns, int vendors, int cost, int xOffset, int yOffset, int zOffset, int multiID )
{
m_Type = type;
m_Description = description;
Type = type;
Description = description;
m_Storage = storage;
m_Lockdowns = lockdowns;
m_NewStorage = newStorage;
m_NewLockdowns = newLockdowns;
m_Vendors = vendors;
m_Cost = cost;
Vendors = vendors;
Cost = cost;
m_Offset = new Point3D( xOffset, yOffset, zOffset );
Offset = new Point3D( xOffset, yOffset, zOffset );
m_MultiID = multiID;
MultiID = multiID;
}
public BaseHouse ConstructHouse( Mobile from )
@ -314,14 +311,14 @@ namespace Server.Items
{
object[] args;
if ( m_Type == typeof( HouseFoundation ) )
args = new object[4]{ from, m_MultiID, m_Storage, m_Lockdowns };
else if ( m_Type == typeof( SmallOldHouse ) || m_Type == typeof( SmallShop ) || m_Type == typeof( TwoStoryHouse ) )
args = new object[2]{ from, m_MultiID };
if ( Type == typeof( HouseFoundation ) )
args = new object[4]{ from, MultiID, m_Storage, m_Lockdowns };
else if ( Type == typeof( SmallOldHouse ) || Type == typeof( SmallShop ) || Type == typeof( TwoStoryHouse ) )
args = new object[2]{ from, MultiID };
else
args = new object[1]{ from };
return Activator.CreateInstance( m_Type, args ) as BaseHouse;
return Activator.CreateInstance( Type, args ) as BaseHouse;
}
catch
{
@ -360,7 +357,7 @@ namespace Server.Items
ArrayList toMove;
//Point3D center = new Point3D( p.X - m_Offset.X, p.Y - m_Offset.Y, p.Z - m_Offset.Z );
HousePlacementResult res = HousePlacement.Check( from, m_MultiID, center, out toMove );
HousePlacementResult res = HousePlacement.Check( from, MultiID, center, out toMove );
switch ( res )
{
@ -377,17 +374,17 @@ namespace Server.Items
if ( house == null )
return;
house.Price = m_Cost;
house.Price = Cost;
if ( from.AccessLevel >= AccessLevel.GameMaster )
{
from.SendMessage( "{0} gold would have been withdrawn from your bank if you were not a GM.", m_Cost.ToString() );
from.SendMessage( "{0} gold would have been withdrawn from your bank if you were not a GM.", Cost.ToString() );
}
else
{
if ( Banker.Withdraw( from, m_Cost ) )
if ( Banker.Withdraw( from, Cost ) )
{
from.SendLocalizedMessage( 1060398, m_Cost.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
from.SendLocalizedMessage( 1060398, Cost.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
}
else
{
@ -451,8 +448,8 @@ namespace Server.Items
return false;
ArrayList toMove;
Point3D center = new Point3D( p.X - m_Offset.X, p.Y - m_Offset.Y, p.Z - m_Offset.Z );
HousePlacementResult res = HousePlacement.Check( from, m_MultiID, center, out toMove );
Point3D center = new Point3D( p.X - Offset.X, p.Y - Offset.Y, p.Z - Offset.Z );
HousePlacementResult res = HousePlacement.Check( from, MultiID, center, out toMove );
switch ( res )
{
@ -466,7 +463,7 @@ namespace Server.Items
{
from.SendLocalizedMessage( 1011576 ); // This is a valid location.
PreviewHouse prev = new PreviewHouse( m_MultiID );
PreviewHouse prev = new PreviewHouse( MultiID );
MultiComponentList mcl = prev.Components;
@ -556,9 +553,9 @@ namespace Server.Items
{
m_Table = new Hashtable();
FillTable( m_ClassicHouses );
FillTable( m_TwoStoryFoundations );
FillTable( m_ThreeStoryFoundations );
FillTable( ClassicHouses );
FillTable( TwoStoryFoundations );
FillTable( ThreeStoryFoundations );
}
public static HousePlacementEntry Find( BaseHouse house )
@ -578,7 +575,7 @@ namespace Server.Items
{
HousePlacementEntry e = (HousePlacementEntry)list[i];
if ( e.m_MultiID == house.ItemID )
if ( e.MultiID == house.ItemID )
return e;
}
}
@ -601,11 +598,11 @@ namespace Server.Items
{
HousePlacementEntry e = entries[i];
object obj = m_Table[e.m_Type];
object obj = m_Table[e.Type];
if ( obj == null )
{
m_Table[e.m_Type] = e;
m_Table[e.Type] = e;
}
else if ( obj is HousePlacementEntry )
{
@ -614,7 +611,7 @@ namespace Server.Items
list.Add( obj );
list.Add( e );
m_Table[e.m_Type] = list;
m_Table[e.Type] = list;
}
else if ( obj is ArrayList )
{
@ -625,11 +622,11 @@ namespace Server.Items
Hashtable table = new Hashtable();
for ( int j = 0; j < list.Count; ++j )
table[((HousePlacementEntry)list[j]).m_MultiID] = list[j];
table[((HousePlacementEntry)list[j]).MultiID] = list[j];
table[e.m_MultiID] = e;
table[e.MultiID] = e;
m_Table[e.m_Type] = table;
m_Table[e.Type] = table;
}
else
{
@ -638,148 +635,145 @@ namespace Server.Items
}
else if ( obj is Hashtable )
{
((Hashtable)obj)[e.m_MultiID] = e;
((Hashtable)obj)[e.MultiID] = e;
}
}
}
private static HousePlacementEntry[] m_ClassicHouses = {
new HousePlacementEntry( typeof( SmallOldHouse ), 1011303, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0064 ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011304, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0066 ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011305, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0068 ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011306, 425, 212, 489, 244, 10, 35250, 0, 4, 0, 0x006A ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011307, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006C ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011308, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006E ),
new HousePlacementEntry( typeof( SmallShop ), 1011321, 425, 212, 489, 244, 10, 50500, -1, 4, 0, 0x00A0 ),
new HousePlacementEntry( typeof( SmallShop ), 1011322, 425, 212, 489, 244, 10, 52500, 0, 4, 0, 0x00A2 ),
new HousePlacementEntry( typeof( SmallTower ), 1011317, 580, 290, 667, 333, 14, 73500, 3, 4, 0, 0x0098 ),
new HousePlacementEntry( typeof( TwoStoryVilla ), 1011319, 1100, 550, 1265, 632, 24, 113750, 3, 6, 0, 0x009E ),
new HousePlacementEntry( typeof( SandStonePatio ), 1011320, 850, 425, 1265, 632, 24, 76500, -1, 4, 0, 0x009C ),
new HousePlacementEntry( typeof( LogCabin ), 1011318, 1100, 550, 1265, 632, 24, 81750, 1, 6, 0, 0x009A ),
new HousePlacementEntry( typeof( GuildHouse ), 1011309, 1370, 685, 1576, 788, 28, 131500, -1, 7, 0, 0x0074 ),
new HousePlacementEntry( typeof( TwoStoryHouse ), 1011310, 1370, 685, 1576, 788, 28, 162750, -3, 7, 0, 0x0076 ),
new HousePlacementEntry( typeof( TwoStoryHouse ), 1011311, 1370, 685, 1576, 788, 28, 162000, -3, 7, 0, 0x0078 ),
new HousePlacementEntry( typeof( LargePatioHouse ), 1011315, 1370, 685, 1576, 788, 28, 129250, -4, 7, 0, 0x008C ),
new HousePlacementEntry( typeof( LargeMarbleHouse ), 1011316, 1370, 685, 1576, 788, 28, 160500, -4, 7, 0, 0x0096 ),
new HousePlacementEntry( typeof( Tower ), 1011312, 2119, 1059, 2437, 1218, 42, 366500, 0, 7, 0, 0x007A ),
new HousePlacementEntry( typeof( Keep ), 1011313, 2625, 1312, 3019, 1509, 52, 572750, 0, 11, 0, 0x007C ),
new HousePlacementEntry( typeof( Castle ), 1011314, 4076, 2038, 4688, 2344, 78, 865250, 0, 16, 0, 0x007E )
};
public static HousePlacementEntry[] ClassicHouses => m_ClassicHouses;
public static HousePlacementEntry[] ClassicHouses { get; } =
{
new HousePlacementEntry( typeof( SmallOldHouse ), 1011303, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0064 ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011304, 425, 212, 489, 244, 10, 37000, 0, 4, 0, 0x0066 ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011305, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x0068 ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011306, 425, 212, 489, 244, 10, 35250, 0, 4, 0, 0x006A ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011307, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006C ),
new HousePlacementEntry( typeof( SmallOldHouse ), 1011308, 425, 212, 489, 244, 10, 36750, 0, 4, 0, 0x006E ),
new HousePlacementEntry( typeof( SmallShop ), 1011321, 425, 212, 489, 244, 10, 50500, -1, 4, 0, 0x00A0 ),
new HousePlacementEntry( typeof( SmallShop ), 1011322, 425, 212, 489, 244, 10, 52500, 0, 4, 0, 0x00A2 ),
new HousePlacementEntry( typeof( SmallTower ), 1011317, 580, 290, 667, 333, 14, 73500, 3, 4, 0, 0x0098 ),
new HousePlacementEntry( typeof( TwoStoryVilla ), 1011319, 1100, 550, 1265, 632, 24, 113750, 3, 6, 0, 0x009E ),
new HousePlacementEntry( typeof( SandStonePatio ), 1011320, 850, 425, 1265, 632, 24, 76500, -1, 4, 0, 0x009C ),
new HousePlacementEntry( typeof( LogCabin ), 1011318, 1100, 550, 1265, 632, 24, 81750, 1, 6, 0, 0x009A ),
new HousePlacementEntry( typeof( GuildHouse ), 1011309, 1370, 685, 1576, 788, 28, 131500, -1, 7, 0, 0x0074 ),
new HousePlacementEntry( typeof( TwoStoryHouse ), 1011310, 1370, 685, 1576, 788, 28, 162750, -3, 7, 0, 0x0076 ),
new HousePlacementEntry( typeof( TwoStoryHouse ), 1011311, 1370, 685, 1576, 788, 28, 162000, -3, 7, 0, 0x0078 ),
new HousePlacementEntry( typeof( LargePatioHouse ), 1011315, 1370, 685, 1576, 788, 28, 129250, -4, 7, 0, 0x008C ),
new HousePlacementEntry( typeof( LargeMarbleHouse ), 1011316, 1370, 685, 1576, 788, 28, 160500, -4, 7, 0, 0x0096 ),
new HousePlacementEntry( typeof( Tower ), 1011312, 2119, 1059, 2437, 1218, 42, 366500, 0, 7, 0, 0x007A ),
new HousePlacementEntry( typeof( Keep ), 1011313, 2625, 1312, 3019, 1509, 52, 572750, 0, 11, 0, 0x007C ),
new HousePlacementEntry( typeof( Castle ), 1011314, 4076, 2038, 4688, 2344, 78, 865250, 0, 16, 0, 0x007E )
};
private static HousePlacementEntry[] m_TwoStoryFoundations = {
new HousePlacementEntry( typeof( HouseFoundation ), 1060241, 425, 212, 489, 244, 10, 30500, 0, 4, 0, 0x13EC ), // 7x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060242, 580, 290, 667, 333, 14, 34500, 0, 5, 0, 0x13ED ), // 7x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060243, 650, 325, 748, 374, 16, 38500, 0, 5, 0, 0x13EE ), // 7x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060244, 700, 350, 805, 402, 16, 42500, 0, 6, 0, 0x13EF ), // 7x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060245, 750, 375, 863, 431, 16, 46500, 0, 6, 0, 0x13F0 ), // 7x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060246, 800, 400, 920, 460, 18, 50500, 0, 7, 0, 0x13F1 ), // 7x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060253, 580, 290, 667, 333, 14, 34500, 0, 4, 0, 0x13F8 ), // 8x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060254, 650, 325, 748, 374, 16, 39000, 0, 5, 0, 0x13F9 ), // 8x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060255, 700, 350, 805, 402, 16, 43500, 0, 5, 0, 0x13FA ), // 8x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060256, 750, 375, 863, 431, 16, 48000, 0, 6, 0, 0x13FB ), // 8x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060257, 800, 400, 920, 460, 18, 52500, 0, 6, 0, 0x13FC ), // 8x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060258, 850, 425, 1265, 632, 24, 57000, 0, 7, 0, 0x13FD ), // 8x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060259, 1100, 550, 1265, 632, 24, 61500, 0, 7, 0, 0x13FE ), // 8x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060265, 650, 325, 748, 374, 16, 38500, 0, 4, 0, 0x1404 ), // 9x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060266, 700, 350, 805, 402, 16, 43500, 0, 5, 0, 0x1405 ), // 9x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060267, 750, 375, 863, 431, 16, 48500, 0, 5, 0, 0x1406 ), // 9x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060268, 800, 400, 920, 460, 18, 53500, 0, 6, 0, 0x1407 ), // 9x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060269, 850, 425, 1265, 632, 24, 58500, 0, 6, 0, 0x1408 ), // 9x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060270, 1100, 550, 1265, 632, 24, 63500, 0, 7, 0, 0x1409 ), // 9x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060271, 1100, 550, 1265, 632, 24, 68500, 0, 7, 0, 0x140A ), // 9x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060277, 700, 350, 805, 402, 16, 42500, 0, 4, 0, 0x1410 ), // 10x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060278, 750, 375, 863, 431, 16, 48000, 0, 5, 0, 0x1411 ), // 10x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060279, 800, 400, 920, 460, 18, 53500, 0, 5, 0, 0x1412 ), // 10x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060280, 850, 425, 1265, 632, 24, 59000, 0, 6, 0, 0x1413 ), // 10x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060281, 1100, 550, 1265, 632, 24, 64500, 0, 6, 0, 0x1414 ), // 10x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060282, 1100, 550, 1265, 632, 24, 70000, 0, 7, 0, 0x1415 ), // 10x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060283, 1150, 575, 1323, 661, 24, 75500, 0, 7, 0, 0x1416 ), // 10x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060289, 750, 375, 863, 431, 16, 46500, 0, 4, 0, 0x141C ), // 11x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060290, 800, 400, 920, 460, 18, 52500, 0, 5, 0, 0x141D ), // 11x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060291, 850, 425, 1265, 632, 24, 58500, 0, 5, 0, 0x141E ), // 11x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060292, 1100, 550, 1265, 632, 24, 64500, 0, 6, 0, 0x141F ), // 11x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060293, 1100, 550, 1265, 632, 24, 70500, 0, 6, 0, 0x1420 ), // 11x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060294, 1150, 575, 1323, 661, 24, 76500, 0, 7, 0, 0x1421 ), // 11x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060295, 1200, 600, 1380, 690, 26, 82500, 0, 7, 0, 0x1422 ), // 11x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060301, 800, 400, 920, 460, 18, 50500, 0, 4, 0, 0x1428 ), // 12x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060302, 850, 425, 1265, 632, 24, 57000, 0, 5, 0, 0x1429 ), // 12x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060303, 1100, 550, 1265, 632, 24, 63500, 0, 5, 0, 0x142A ), // 12x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060304, 1100, 550, 1265, 632, 24, 70000, 0, 6, 0, 0x142B ), // 12x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060305, 1150, 575, 1323, 661, 24, 76500, 0, 6, 0, 0x142C ), // 12x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060306, 1200, 600, 1380, 690, 26, 83000, 0, 7, 0, 0x142D ), // 12x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060307, 1250, 625, 1438, 719, 26, 89500, 0, 7, 0, 0x142E ), // 12x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060314, 1100, 550, 1265, 632, 24, 61500, 0, 5, 0, 0x1435 ), // 13x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060315, 1100, 550, 1265, 632, 24, 68500, 0, 5, 0, 0x1436 ), // 13x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060316, 1150, 575, 1323, 661, 24, 75500, 0, 6, 0, 0x1437 ), // 13x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060317, 1200, 600, 1380, 690, 26, 82500, 0, 6, 0, 0x1438 ), // 13x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060318, 1250, 625, 1438, 719, 26, 89500, 0, 7, 0, 0x1439 ), // 13x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060319, 1300, 650, 1495, 747, 28, 96500, 0, 7, 0, 0x143A ) // 13x13 2-Story Customizable House
};
public static HousePlacementEntry[] TwoStoryFoundations => m_TwoStoryFoundations;
public static HousePlacementEntry[] TwoStoryFoundations { get; } =
{
new HousePlacementEntry( typeof( HouseFoundation ), 1060241, 425, 212, 489, 244, 10, 30500, 0, 4, 0, 0x13EC ), // 7x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060242, 580, 290, 667, 333, 14, 34500, 0, 5, 0, 0x13ED ), // 7x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060243, 650, 325, 748, 374, 16, 38500, 0, 5, 0, 0x13EE ), // 7x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060244, 700, 350, 805, 402, 16, 42500, 0, 6, 0, 0x13EF ), // 7x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060245, 750, 375, 863, 431, 16, 46500, 0, 6, 0, 0x13F0 ), // 7x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060246, 800, 400, 920, 460, 18, 50500, 0, 7, 0, 0x13F1 ), // 7x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060253, 580, 290, 667, 333, 14, 34500, 0, 4, 0, 0x13F8 ), // 8x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060254, 650, 325, 748, 374, 16, 39000, 0, 5, 0, 0x13F9 ), // 8x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060255, 700, 350, 805, 402, 16, 43500, 0, 5, 0, 0x13FA ), // 8x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060256, 750, 375, 863, 431, 16, 48000, 0, 6, 0, 0x13FB ), // 8x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060257, 800, 400, 920, 460, 18, 52500, 0, 6, 0, 0x13FC ), // 8x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060258, 850, 425, 1265, 632, 24, 57000, 0, 7, 0, 0x13FD ), // 8x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060259, 1100, 550, 1265, 632, 24, 61500, 0, 7, 0, 0x13FE ), // 8x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060265, 650, 325, 748, 374, 16, 38500, 0, 4, 0, 0x1404 ), // 9x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060266, 700, 350, 805, 402, 16, 43500, 0, 5, 0, 0x1405 ), // 9x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060267, 750, 375, 863, 431, 16, 48500, 0, 5, 0, 0x1406 ), // 9x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060268, 800, 400, 920, 460, 18, 53500, 0, 6, 0, 0x1407 ), // 9x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060269, 850, 425, 1265, 632, 24, 58500, 0, 6, 0, 0x1408 ), // 9x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060270, 1100, 550, 1265, 632, 24, 63500, 0, 7, 0, 0x1409 ), // 9x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060271, 1100, 550, 1265, 632, 24, 68500, 0, 7, 0, 0x140A ), // 9x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060277, 700, 350, 805, 402, 16, 42500, 0, 4, 0, 0x1410 ), // 10x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060278, 750, 375, 863, 431, 16, 48000, 0, 5, 0, 0x1411 ), // 10x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060279, 800, 400, 920, 460, 18, 53500, 0, 5, 0, 0x1412 ), // 10x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060280, 850, 425, 1265, 632, 24, 59000, 0, 6, 0, 0x1413 ), // 10x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060281, 1100, 550, 1265, 632, 24, 64500, 0, 6, 0, 0x1414 ), // 10x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060282, 1100, 550, 1265, 632, 24, 70000, 0, 7, 0, 0x1415 ), // 10x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060283, 1150, 575, 1323, 661, 24, 75500, 0, 7, 0, 0x1416 ), // 10x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060289, 750, 375, 863, 431, 16, 46500, 0, 4, 0, 0x141C ), // 11x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060290, 800, 400, 920, 460, 18, 52500, 0, 5, 0, 0x141D ), // 11x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060291, 850, 425, 1265, 632, 24, 58500, 0, 5, 0, 0x141E ), // 11x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060292, 1100, 550, 1265, 632, 24, 64500, 0, 6, 0, 0x141F ), // 11x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060293, 1100, 550, 1265, 632, 24, 70500, 0, 6, 0, 0x1420 ), // 11x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060294, 1150, 575, 1323, 661, 24, 76500, 0, 7, 0, 0x1421 ), // 11x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060295, 1200, 600, 1380, 690, 26, 82500, 0, 7, 0, 0x1422 ), // 11x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060301, 800, 400, 920, 460, 18, 50500, 0, 4, 0, 0x1428 ), // 12x7 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060302, 850, 425, 1265, 632, 24, 57000, 0, 5, 0, 0x1429 ), // 12x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060303, 1100, 550, 1265, 632, 24, 63500, 0, 5, 0, 0x142A ), // 12x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060304, 1100, 550, 1265, 632, 24, 70000, 0, 6, 0, 0x142B ), // 12x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060305, 1150, 575, 1323, 661, 24, 76500, 0, 6, 0, 0x142C ), // 12x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060306, 1200, 600, 1380, 690, 26, 83000, 0, 7, 0, 0x142D ), // 12x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060307, 1250, 625, 1438, 719, 26, 89500, 0, 7, 0, 0x142E ), // 12x13 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060314, 1100, 550, 1265, 632, 24, 61500, 0, 5, 0, 0x1435 ), // 13x8 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060315, 1100, 550, 1265, 632, 24, 68500, 0, 5, 0, 0x1436 ), // 13x9 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060316, 1150, 575, 1323, 661, 24, 75500, 0, 6, 0, 0x1437 ), // 13x10 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060317, 1200, 600, 1380, 690, 26, 82500, 0, 6, 0, 0x1438 ), // 13x11 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060318, 1250, 625, 1438, 719, 26, 89500, 0, 7, 0, 0x1439 ), // 13x12 2-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060319, 1300, 650, 1495, 747, 28, 96500, 0, 7, 0, 0x143A ) // 13x13 2-Story Customizable House
};
private static HousePlacementEntry[] m_ThreeStoryFoundations = {
new HousePlacementEntry( typeof( HouseFoundation ), 1060272, 1150, 575, 1323, 661, 24, 73500, 0, 8, 0, 0x140B ), // 9x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060284, 1200, 600, 1380, 690, 26, 81000, 0, 8, 0, 0x1417 ), // 10x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060285, 1250, 625, 1438, 719, 26, 86500, 0, 8, 0, 0x1418 ), // 10x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060296, 1250, 625, 1438, 719, 26, 88500, 0, 8, 0, 0x1423 ), // 11x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060297, 1300, 650, 1495, 747, 28, 94500, 0, 8, 0, 0x1424 ), // 11x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060298, 1350, 675, 1553, 776, 28, 100500, 0, 9, 0, 0x1425 ), // 11x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060308, 1300, 650, 1495, 747, 28, 96000, 0, 8, 0, 0x142F ), // 12x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060309, 1350, 675, 1553, 776, 28, 102500, 0, 8, 0, 0x1430 ), // 12x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060310, 1370, 685, 1576, 788, 28, 109000, 0, 9, 0, 0x1431 ), // 12x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060311, 1370, 685, 1576, 788, 28, 115500, 0, 9, 0, 0x1432 ), // 12x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060320, 1350, 675, 1553, 776, 28, 103500, 0, 8, 0, 0x143B ), // 13x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060321, 1370, 685, 1576, 788, 28, 110500, 0, 8, 0, 0x143C ), // 13x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060322, 1370, 685, 1576, 788, 28, 117500, 0, 9, 0, 0x143D ), // 13x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060323, 2119, 1059, 2437, 1218, 42, 124500, 0, 9, 0, 0x143E ), // 13x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060324, 2119, 1059, 2437, 1218, 42, 131500, 0, 10, 0, 0x143F ), // 13x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060327, 1150, 575, 1323, 661, 24, 73500, 0, 5, 0, 0x1442 ), // 14x9 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060328, 1200, 600, 1380, 690, 26, 81000, 0, 6, 0, 0x1443 ), // 14x10 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060329, 1250, 625, 1438, 719, 26, 88500, 0, 6, 0, 0x1444 ), // 14x11 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060330, 1300, 650, 1495, 747, 28, 96000, 0, 7, 0, 0x1445 ), // 14x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060331, 1350, 675, 1553, 776, 28, 103500, 0, 7, 0, 0x1446 ), // 14x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060332, 1370, 685, 1576, 788, 28, 111000, 0, 8, 0, 0x1447 ), // 14x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060333, 1370, 685, 1576, 788, 28, 118500, 0, 8, 0, 0x1448 ), // 14x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060334, 2119, 1059, 2437, 1218, 42, 126000, 0, 9, 0, 0x1449 ), // 14x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060335, 2119, 1059, 2437, 1218, 42, 133500, 0, 9, 0, 0x144A ), // 14x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060336, 2119, 1059, 2437, 1218, 42, 141000, 0, 10, 0, 0x144B ), // 14x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060340, 1250, 625, 1438, 719, 26, 86500, 0, 6, 0, 0x144F ), // 15x10 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060341, 1300, 650, 1495, 747, 28, 94500, 0, 6, 0, 0x1450 ), // 15x11 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060342, 1350, 675, 1553, 776, 28, 102500, 0, 7, 0, 0x1451 ), // 15x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060343, 1370, 685, 1576, 788, 28, 110500, 0, 7, 0, 0x1452 ), // 15x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060344, 1370, 685, 1576, 788, 28, 118500, 0, 8, 0, 0x1453 ), // 15x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060345, 2119, 1059, 2437, 1218, 42, 126500, 0, 8, 0, 0x1454 ), // 15x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060346, 2119, 1059, 2437, 1218, 42, 134500, 0, 9, 0, 0x1455 ), // 15x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060347, 2119, 1059, 2437, 1218, 42, 142500, 0, 9, 0, 0x1456 ), // 15x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060348, 2119, 1059, 2437, 1218, 42, 150500, 0, 10, 0, 0x1457 ), // 15x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060353, 1350, 675, 1553, 776, 28, 100500, 0, 6, 0, 0x145C ), // 16x11 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060354, 1370, 685, 1576, 788, 28, 109000, 0, 7, 0, 0x145D ), // 16x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060355, 1370, 685, 1576, 788, 28, 117500, 0, 7, 0, 0x145E ), // 16x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060356, 2119, 1059, 2437, 1218, 42, 126000, 0, 8, 0, 0x145F ), // 16x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060357, 2119, 1059, 2437, 1218, 42, 134500, 0, 8, 0, 0x1460 ), // 16x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060358, 2119, 1059, 2437, 1218, 42, 143000, 0, 9, 0, 0x1461 ), // 16x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060359, 2119, 1059, 2437, 1218, 42, 151500, 0, 9, 0, 0x1462 ), // 16x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060360, 2119, 1059, 2437, 1218, 42, 160000, 0, 10, 0, 0x1463 ), // 16x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060366, 1370, 685, 1576, 788, 28, 115500, 0, 7, 0, 0x1469 ), // 17x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060367, 2119, 1059, 2437, 1218, 42, 124500, 0, 7, 0, 0x146A ), // 17x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060368, 2119, 1059, 2437, 1218, 42, 133500, 0, 8, 0, 0x146B ), // 17x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060369, 2119, 1059, 2437, 1218, 42, 142500, 0, 8, 0, 0x146C ), // 17x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060370, 2119, 1059, 2437, 1218, 42, 151500, 0, 9, 0, 0x146D ), // 17x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060371, 2119, 1059, 2437, 1218, 42, 160500, 0, 9, 0, 0x146E ), // 17x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060372, 2119, 1059, 2437, 1218, 42, 169500, 0, 10, 0, 0x146F ), // 17x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060379, 2119, 1059, 2437, 1218, 42, 131500, 0, 7, 0, 0x1476 ), // 18x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060380, 2119, 1059, 2437, 1218, 42, 141000, 0, 8, 0, 0x1477 ), // 18x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060381, 2119, 1059, 2437, 1218, 42, 150500, 0, 8, 0, 0x1478 ), // 18x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060382, 2119, 1059, 2437, 1218, 42, 160000, 0, 9, 0, 0x1479 ), // 18x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060383, 2119, 1059, 2437, 1218, 42, 169500, 0, 9, 0, 0x147A ), // 18x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060384, 2119, 1059, 2437, 1218, 42, 179000, 0, 10, 0, 0x147B ) // 18x18 3-Story Customizable House
};
public static HousePlacementEntry[] ThreeStoryFoundations => m_ThreeStoryFoundations;
public static HousePlacementEntry[] ThreeStoryFoundations { get; } =
{
new HousePlacementEntry( typeof( HouseFoundation ), 1060272, 1150, 575, 1323, 661, 24, 73500, 0, 8, 0, 0x140B ), // 9x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060284, 1200, 600, 1380, 690, 26, 81000, 0, 8, 0, 0x1417 ), // 10x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060285, 1250, 625, 1438, 719, 26, 86500, 0, 8, 0, 0x1418 ), // 10x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060296, 1250, 625, 1438, 719, 26, 88500, 0, 8, 0, 0x1423 ), // 11x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060297, 1300, 650, 1495, 747, 28, 94500, 0, 8, 0, 0x1424 ), // 11x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060298, 1350, 675, 1553, 776, 28, 100500, 0, 9, 0, 0x1425 ), // 11x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060308, 1300, 650, 1495, 747, 28, 96000, 0, 8, 0, 0x142F ), // 12x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060309, 1350, 675, 1553, 776, 28, 102500, 0, 8, 0, 0x1430 ), // 12x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060310, 1370, 685, 1576, 788, 28, 109000, 0, 9, 0, 0x1431 ), // 12x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060311, 1370, 685, 1576, 788, 28, 115500, 0, 9, 0, 0x1432 ), // 12x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060320, 1350, 675, 1553, 776, 28, 103500, 0, 8, 0, 0x143B ), // 13x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060321, 1370, 685, 1576, 788, 28, 110500, 0, 8, 0, 0x143C ), // 13x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060322, 1370, 685, 1576, 788, 28, 117500, 0, 9, 0, 0x143D ), // 13x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060323, 2119, 1059, 2437, 1218, 42, 124500, 0, 9, 0, 0x143E ), // 13x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060324, 2119, 1059, 2437, 1218, 42, 131500, 0, 10, 0, 0x143F ), // 13x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060327, 1150, 575, 1323, 661, 24, 73500, 0, 5, 0, 0x1442 ), // 14x9 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060328, 1200, 600, 1380, 690, 26, 81000, 0, 6, 0, 0x1443 ), // 14x10 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060329, 1250, 625, 1438, 719, 26, 88500, 0, 6, 0, 0x1444 ), // 14x11 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060330, 1300, 650, 1495, 747, 28, 96000, 0, 7, 0, 0x1445 ), // 14x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060331, 1350, 675, 1553, 776, 28, 103500, 0, 7, 0, 0x1446 ), // 14x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060332, 1370, 685, 1576, 788, 28, 111000, 0, 8, 0, 0x1447 ), // 14x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060333, 1370, 685, 1576, 788, 28, 118500, 0, 8, 0, 0x1448 ), // 14x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060334, 2119, 1059, 2437, 1218, 42, 126000, 0, 9, 0, 0x1449 ), // 14x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060335, 2119, 1059, 2437, 1218, 42, 133500, 0, 9, 0, 0x144A ), // 14x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060336, 2119, 1059, 2437, 1218, 42, 141000, 0, 10, 0, 0x144B ), // 14x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060340, 1250, 625, 1438, 719, 26, 86500, 0, 6, 0, 0x144F ), // 15x10 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060341, 1300, 650, 1495, 747, 28, 94500, 0, 6, 0, 0x1450 ), // 15x11 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060342, 1350, 675, 1553, 776, 28, 102500, 0, 7, 0, 0x1451 ), // 15x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060343, 1370, 685, 1576, 788, 28, 110500, 0, 7, 0, 0x1452 ), // 15x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060344, 1370, 685, 1576, 788, 28, 118500, 0, 8, 0, 0x1453 ), // 15x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060345, 2119, 1059, 2437, 1218, 42, 126500, 0, 8, 0, 0x1454 ), // 15x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060346, 2119, 1059, 2437, 1218, 42, 134500, 0, 9, 0, 0x1455 ), // 15x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060347, 2119, 1059, 2437, 1218, 42, 142500, 0, 9, 0, 0x1456 ), // 15x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060348, 2119, 1059, 2437, 1218, 42, 150500, 0, 10, 0, 0x1457 ), // 15x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060353, 1350, 675, 1553, 776, 28, 100500, 0, 6, 0, 0x145C ), // 16x11 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060354, 1370, 685, 1576, 788, 28, 109000, 0, 7, 0, 0x145D ), // 16x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060355, 1370, 685, 1576, 788, 28, 117500, 0, 7, 0, 0x145E ), // 16x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060356, 2119, 1059, 2437, 1218, 42, 126000, 0, 8, 0, 0x145F ), // 16x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060357, 2119, 1059, 2437, 1218, 42, 134500, 0, 8, 0, 0x1460 ), // 16x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060358, 2119, 1059, 2437, 1218, 42, 143000, 0, 9, 0, 0x1461 ), // 16x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060359, 2119, 1059, 2437, 1218, 42, 151500, 0, 9, 0, 0x1462 ), // 16x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060360, 2119, 1059, 2437, 1218, 42, 160000, 0, 10, 0, 0x1463 ), // 16x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060366, 1370, 685, 1576, 788, 28, 115500, 0, 7, 0, 0x1469 ), // 17x12 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060367, 2119, 1059, 2437, 1218, 42, 124500, 0, 7, 0, 0x146A ), // 17x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060368, 2119, 1059, 2437, 1218, 42, 133500, 0, 8, 0, 0x146B ), // 17x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060369, 2119, 1059, 2437, 1218, 42, 142500, 0, 8, 0, 0x146C ), // 17x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060370, 2119, 1059, 2437, 1218, 42, 151500, 0, 9, 0, 0x146D ), // 17x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060371, 2119, 1059, 2437, 1218, 42, 160500, 0, 9, 0, 0x146E ), // 17x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060372, 2119, 1059, 2437, 1218, 42, 169500, 0, 10, 0, 0x146F ), // 17x18 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060379, 2119, 1059, 2437, 1218, 42, 131500, 0, 7, 0, 0x1476 ), // 18x13 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060380, 2119, 1059, 2437, 1218, 42, 141000, 0, 8, 0, 0x1477 ), // 18x14 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060381, 2119, 1059, 2437, 1218, 42, 150500, 0, 8, 0, 0x1478 ), // 18x15 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060382, 2119, 1059, 2437, 1218, 42, 160000, 0, 9, 0, 0x1479 ), // 18x16 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060383, 2119, 1059, 2437, 1218, 42, 169500, 0, 9, 0, 0x147A ), // 18x17 3-Story Customizable House
new HousePlacementEntry( typeof( HouseFoundation ), 1060384, 2119, 1059, 2437, 1218, 42, 179000, 0, 10, 0, 0x147B ) // 18x18 3-Story Customizable House
};
}
}

View file

@ -7,13 +7,10 @@ namespace Server.Multis
{
public class HouseSign : Item
{
private BaseHouse m_Owner;
private Mobile m_OrgOwner;
public HouseSign( BaseHouse owner ) : base( 0xBD2 )
{
m_Owner = owner;
m_OrgOwner = m_Owner.Owner;
Owner = owner;
OriginalOwner = Owner.Owner;
Movable = false;
}
@ -29,24 +26,24 @@ namespace Server.Multis
return Name;
}
public BaseHouse Owner => m_Owner;
public BaseHouse Owner { get; private set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool RestrictDecay
{
get => ( m_Owner != null && m_Owner.RestrictDecay );
set{ if ( m_Owner != null ) m_Owner.RestrictDecay = value; }
get => ( Owner != null && Owner.RestrictDecay );
set{ if ( Owner != null ) Owner.RestrictDecay = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public Mobile OriginalOwner => m_OrgOwner;
public Mobile OriginalOwner { get; private set; }
public override void OnAfterDelete()
{
base.OnAfterDelete();
if ( m_Owner != null && !m_Owner.Deleted )
m_Owner.Delete();
if ( Owner != null && !Owner.Deleted )
Owner.Delete();
}
public override void AddNameProperty(ObjectPropertyList list)
@ -56,24 +53,22 @@ namespace Server.Multis
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
private bool m_GettingProperties;
public bool GettingProperties => m_GettingProperties;
public bool GettingProperties { get; private set; }
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
list.Add( 1061639, Utility.FixHtml( GetName() ) ); // Name: ~1_NAME~
list.Add( 1061640, (m_Owner?.Owner == null) ? "nobody" : m_Owner.Owner.Name ); // Owner: ~1_OWNER~
list.Add( 1061640, (Owner?.Owner == null) ? "nobody" : Owner.Owner.Name ); // Owner: ~1_OWNER~
if ( m_Owner != null )
if ( Owner != null )
{
list.Add( m_Owner.Public ? 1061641 : 1061642 ); // This House is Open to the Public : This is a Private Home
list.Add( Owner.Public ? 1061641 : 1061642 ); // This House is Open to the Public : This is a Private Home
m_GettingProperties = true;
DecayLevel level = m_Owner.DecayLevel;
m_GettingProperties = false;
GettingProperties = true;
DecayLevel level = Owner.DecayLevel;
GettingProperties = false;
if ( level == DecayLevel.DemolitionPending )
{
@ -91,11 +86,11 @@ namespace Server.Multis
public override void OnSingleClick( Mobile from )
{
if ( m_Owner != null && BaseHouse.DecayEnabled && m_Owner.DecayPeriod != TimeSpan.Zero )
if ( Owner != null && BaseHouse.DecayEnabled && Owner.DecayPeriod != TimeSpan.Zero )
{
string message;
switch ( m_Owner.DecayLevel )
switch ( Owner.DecayLevel )
{
case DecayLevel.Ageless: message = "ageless"; break;
case DecayLevel.Fairly: message = "fairly worn"; break;
@ -114,40 +109,40 @@ namespace Server.Multis
public void ShowSign( Mobile m )
{
if ( m_Owner != null )
if ( Owner != null )
{
if ( m_Owner.IsFriend( m ) && m.AccessLevel < AccessLevel.GameMaster )
if ( Owner.IsFriend( m ) && m.AccessLevel < AccessLevel.GameMaster )
{
#region Mondain's Legacy
if ( ( Core.ML && m_Owner.IsOwner( m ) ) || !Core.ML )
m_Owner.RefreshDecay();
if ( ( Core.ML && Owner.IsOwner( m ) ) || !Core.ML )
Owner.RefreshDecay();
#endregion
if ( !Core.AOS )
m.SendLocalizedMessage( 501293 ); // Welcome back to the house, friend!
}
if ( m_Owner.IsAosRules )
m.SendGump( new HouseGumpAOS( HouseGumpPageAOS.Information, m, m_Owner ) );
if ( Owner.IsAosRules )
m.SendGump( new HouseGumpAOS( HouseGumpPageAOS.Information, m, Owner ) );
else
m.SendGump( new HouseGump( m, m_Owner ) );
m.SendGump( new HouseGump( m, Owner ) );
}
}
public void ClaimGump_Callback( Mobile from, bool okay, object state )
{
if ( okay && m_Owner != null && m_Owner.Owner == null && m_Owner.DecayLevel != DecayLevel.DemolitionPending )
if ( okay && Owner != null && Owner.Owner == null && Owner.DecayLevel != DecayLevel.DemolitionPending )
{
bool canClaim = false;
if ( m_Owner.CoOwners == null || m_Owner.CoOwners.Count == 0 )
canClaim = m_Owner.IsFriend( from );
if ( Owner.CoOwners == null || Owner.CoOwners.Count == 0 )
canClaim = Owner.IsFriend( from );
else
canClaim = m_Owner.IsCoOwner( from );
canClaim = Owner.IsCoOwner( from );
if ( canClaim && !BaseHouse.HasAccountHouse( from ) )
{
m_Owner.Owner = from;
m_Owner.LastTraded = DateTime.UtcNow;
Owner.Owner = from;
Owner.LastTraded = DateTime.UtcNow;
}
}
@ -156,17 +151,17 @@ namespace Server.Multis
public override void OnDoubleClick( Mobile m )
{
if ( m_Owner == null )
if ( Owner == null )
return;
if ( m.AccessLevel < AccessLevel.GameMaster && m_Owner.Owner == null && m_Owner.DecayLevel != DecayLevel.DemolitionPending )
if ( m.AccessLevel < AccessLevel.GameMaster && Owner.Owner == null && Owner.DecayLevel != DecayLevel.DemolitionPending )
{
bool canClaim = false;
if ( m_Owner.CoOwners == null || m_Owner.CoOwners.Count == 0 )
canClaim = m_Owner.IsFriend( m );
if ( Owner.CoOwners == null || Owner.CoOwners.Count == 0 )
canClaim = Owner.IsFriend( m );
else
canClaim = m_Owner.IsCoOwner( m );
canClaim = Owner.IsCoOwner( m );
if ( canClaim && !BaseHouse.HasAccountHouse( m ) )
{
@ -260,8 +255,8 @@ namespace Server.Multis
writer.Write( (int) 0 ); // version
writer.Write( m_Owner );
writer.Write( m_OrgOwner );
writer.Write( Owner );
writer.Write( OriginalOwner );
}
public override void Deserialize( GenericReader reader )
@ -274,8 +269,8 @@ namespace Server.Multis
{
case 0:
{
m_Owner = reader.ReadItem() as BaseHouse;
m_OrgOwner = reader.ReadMobile();
Owner = reader.ReadItem() as BaseHouse;
OriginalOwner = reader.ReadMobile();
break;
}

View file

@ -8,22 +8,11 @@ namespace Server.Items
{
public class HouseTeleporter : Item, ISecurable
{
private Item m_Target;
private SecureLevel m_Level;
[CommandProperty( AccessLevel.GameMaster )]
public Item Target { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public Item Target
{
get => m_Target;
set => m_Target = value;
}
[CommandProperty( AccessLevel.GameMaster )]
public SecureLevel Level
{
get => m_Level;
set => m_Level = value;
}
public SecureLevel Level { get; set; }
[Constructible]
public HouseTeleporter( int itemID ) : this( itemID, null )
@ -34,9 +23,9 @@ namespace Server.Items
{
Movable = false;
m_Level = SecureLevel.Anyone;
Level = SecureLevel.Anyone;
m_Target = target;
Target = target;
}
public bool CheckAccess( Mobile m )
@ -46,12 +35,12 @@ namespace Server.Items
if ( house != null && (house.Public ? house.IsBanned( m ) : !house.HasAccess( m )) )
return false;
return ( house != null && house.HasSecureAccess( m, m_Level ) );
return ( house != null && house.HasSecureAccess( m, Level ) );
}
public override bool OnMoveOver( Mobile m )
{
if ( m_Target != null && !m_Target.Deleted )
if ( Target != null && !Target.Deleted )
{
if ( CheckAccess( m ) )
{
@ -85,9 +74,9 @@ namespace Server.Items
writer.Write( (int) 1 ); // version
writer.Write( (int) m_Level );
writer.Write( (int) Level );
writer.Write( (Item) m_Target );
writer.Write( (Item) Target );
}
public override void Deserialize( GenericReader reader )
@ -100,15 +89,15 @@ namespace Server.Items
{
case 1:
{
m_Level = (SecureLevel)reader.ReadInt();
Level = (SecureLevel)reader.ReadInt();
goto case 0;
}
case 0:
{
m_Target = reader.ReadItem();
Target = reader.ReadItem();
if ( version < 0 )
m_Level = SecureLevel.Anyone;
Level = SecureLevel.Anyone;
break;
}
@ -152,7 +141,7 @@ namespace Server.Items
protected override void OnTick()
{
Item target = m_Teleporter.m_Target;
Item target = m_Teleporter.Target;
if ( target != null && !target.Deleted )
{

View file

@ -15,15 +15,9 @@ namespace Server.Multis
public override int LabelNumber => 1061690; // Packing Crate
private BaseHouse m_House;
private Timer m_InternalizeTimer;
public BaseHouse House
{
get => m_House;
set => m_House = value;
}
public BaseHouse House { get; set; }
public override int DefaultMaxItems => 0;
public override int DefaultMaxWeight => 0;
@ -33,7 +27,7 @@ namespace Server.Multis
Hue = 0x8A5;
Movable = false;
m_House = house;
House = house;
}
public MovingCrate( Serial serial ) : base( serial )
@ -225,7 +219,7 @@ namespace Server.Multis
writer.WriteEncodedInt( 1 );
writer.Write( (Item) m_House );
writer.Write( (Item) House );
}
public override void Deserialize( GenericReader reader )
@ -234,11 +228,11 @@ namespace Server.Multis
int version = reader.ReadEncodedInt();
m_House = reader.ReadItem() as BaseHouse;
House = reader.ReadItem() as BaseHouse;
if ( m_House != null )
if ( House != null )
{
m_House.MovingCrate = this;
House.MovingCrate = this;
Timer.DelayCall( TimeSpan.Zero, Hide );
}
else