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

@ -296,7 +296,7 @@ namespace Server.Engines.ConPVP
}
}
public class LadderEntry : IComparable
public class LadderEntry : IComparable<LadderEntry>
{
private int m_Experience;
private Ladder m_Ladder;
@ -350,9 +350,9 @@ namespace Server.Engines.ConPVP
[CommandProperty(AccessLevel.GameMaster)]
public int Rank => Index;
public int CompareTo(object obj)
public int CompareTo(LadderEntry l)
{
return ((LadderEntry)obj).m_Experience - m_Experience;
return (l?.m_Experience ?? 0) - m_Experience;
}
public void Serialize(GenericWriter writer)