Changes properties to use automatic property initializers
This commit is contained in:
parent
f0a48ad431
commit
06fa31a7bf
623 changed files with 13072 additions and 19304 deletions
|
|
@ -2,30 +2,14 @@ namespace Server.Items
|
|||
{
|
||||
public class KhaldunPitTeleporter : Item
|
||||
{
|
||||
private bool m_Active;
|
||||
private Point3D m_PointDest;
|
||||
private Map m_MapDest;
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Active { get; set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Active
|
||||
{
|
||||
get => m_Active;
|
||||
set => m_Active = value;
|
||||
}
|
||||
public Point3D PointDest { get; set; }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D PointDest
|
||||
{
|
||||
get => m_PointDest;
|
||||
set => m_PointDest = value;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Map MapDest
|
||||
{
|
||||
get => m_MapDest;
|
||||
set => m_MapDest = value;
|
||||
}
|
||||
public Map MapDest { get; set; }
|
||||
|
||||
public override int LabelNumber => 1016511; // the floor of the cavern seems to have collapsed here - a faint light is visible at the bottom of the pit
|
||||
|
||||
|
|
@ -40,9 +24,9 @@ namespace Server.Items
|
|||
Movable = false;
|
||||
Hue = 1;
|
||||
|
||||
m_Active = true;
|
||||
m_PointDest = pointDest;
|
||||
m_MapDest = mapDest;
|
||||
Active = true;
|
||||
PointDest = pointDest;
|
||||
MapDest = mapDest;
|
||||
}
|
||||
|
||||
public KhaldunPitTeleporter( Serial serial ) : base( serial )
|
||||
|
|
@ -51,24 +35,24 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick( Mobile m )
|
||||
{
|
||||
if ( !m_Active )
|
||||
if ( !Active )
|
||||
return;
|
||||
|
||||
Map map = m_MapDest;
|
||||
Map map = MapDest;
|
||||
|
||||
if ( map == null || map == Map.Internal )
|
||||
map = m.Map;
|
||||
|
||||
Point3D p = m_PointDest;
|
||||
Point3D p = PointDest;
|
||||
|
||||
if ( p == Point3D.Zero )
|
||||
p = m.Location;
|
||||
|
||||
if ( m.InRange( this, 3 ) )
|
||||
{
|
||||
Mobiles.BaseCreature.TeleportPets( m, m_PointDest, m_MapDest );
|
||||
Mobiles.BaseCreature.TeleportPets( m, PointDest, MapDest );
|
||||
|
||||
m.MoveToWorld( m_PointDest, m_MapDest );
|
||||
m.MoveToWorld( PointDest, MapDest );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -87,9 +71,9 @@ namespace Server.Items
|
|||
|
||||
writer.Write( (int)0 ); // version
|
||||
|
||||
writer.Write( m_Active );
|
||||
writer.Write( m_PointDest );
|
||||
writer.Write( m_MapDest );
|
||||
writer.Write( Active );
|
||||
writer.Write( PointDest );
|
||||
writer.Write( MapDest );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -98,9 +82,9 @@ namespace Server.Items
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Active = reader.ReadBool();
|
||||
m_PointDest = reader.ReadPoint3D();
|
||||
m_MapDest = reader.ReadMap();
|
||||
Active = reader.ReadBool();
|
||||
PointDest = reader.ReadPoint3D();
|
||||
MapDest = reader.ReadMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue