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

@ -7694,31 +7694,16 @@ namespace Server
}
}
#region CompareTo(...)
public int CompareTo(IEntity other)
int IComparable<IEntity>.CompareTo(IEntity other)
{
if (other == null)
return -1;
return Serial.CompareTo(other.Serial);
return other == null ? -1 : Serial.CompareTo(other.Serial);
}
public int CompareTo(Mobile other)
{
return CompareTo((IEntity)other);
return other == null ? -1 : Serial.CompareTo(other.Serial);
}
public int CompareTo(object other)
{
if (other == null || other is IEntity)
return CompareTo((IEntity)other);
throw new ArgumentException();
}
#endregion
#region Handlers
public static AllowBeneficialHandler AllowBeneficialHandler{ get; set; }