Removes old comparable/comparers. (#31)
This commit is contained in:
parent
513e54f70e
commit
a45094f2dc
23 changed files with 95 additions and 249 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue