Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -86,13 +86,9 @@ namespace Server.Engines.ConPVP
|
|||
[PropertyObject]
|
||||
public class ArenaStartPoints
|
||||
{
|
||||
public ArenaStartPoints() : this(new Point3D[8])
|
||||
public ArenaStartPoints(Point3D[] points = null)
|
||||
{
|
||||
}
|
||||
|
||||
public ArenaStartPoints(Point3D[] points)
|
||||
{
|
||||
Points = points;
|
||||
Points = points ?? new Point3D[8];
|
||||
}
|
||||
|
||||
public ArenaStartPoints(GenericReader reader)
|
||||
|
|
@ -407,7 +403,8 @@ namespace Server.Engines.ConPVP
|
|||
set
|
||||
{
|
||||
m_GateOut = value;
|
||||
if (Teleporter != null) Teleporter.Location = m_GateOut;
|
||||
if (Teleporter != null)
|
||||
Teleporter.Location = m_GateOut;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -664,7 +661,7 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
ArenaController controller = allControllers[i];
|
||||
|
||||
if (controller != null && !controller.Deleted && controller.Arena != null && controller.IsPrivate &&
|
||||
if (controller?.Deleted == false && controller.Arena != null && controller.IsPrivate &&
|
||||
controller.Map == first.Map && first.InRange(controller, 24))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(controller);
|
||||
|
|
@ -832,4 +829,4 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue