Removes old comparable/comparers. (#31)

This commit is contained in:
Kamron Batman 2019-03-11 15:35:04 -07:00 • committed by GitHub
parent 513e54f70e
commit a45094f2dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 95 additions and 249 deletions

View file

@ -172,7 +172,7 @@ namespace Server.Engines.ConPVP
}
[PropertyObject]
public class Arena : IComparable
public class Arena : IComparable<Arena>
{
private bool m_Active;
private Rectangle2D m_Bounds;
@ -456,10 +456,8 @@ namespace Server.Engines.ConPVP
public static List<Arena> Arenas{ get; } = new List<Arena>();
public int CompareTo(object obj)
public int CompareTo(Arena c)
{
Arena c = (Arena)obj;
string a = m_Name;
string b = c.m_Name;
@ -475,18 +473,13 @@ namespace Server.Engines.ConPVP
public Ladder AcquireLadder()
{
if (Ladder != null)
return Ladder.Ladder;
return ConPVP.Ladder.Instance;
return Ladder?.Ladder ?? ConPVP.Ladder.Instance;
}
public void Delete()
{
Active = false;
m_Region?.Unregister();
m_Region = null;
}