Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -22,14 +22,14 @@ using System;
|
|||
|
||||
namespace Server
|
||||
{
|
||||
public struct Serial : IComparable<Serial>, IComparable<uint>
|
||||
public readonly struct Serial : IComparable<Serial>, IComparable<uint>, IEquatable<Serial>
|
||||
{
|
||||
public static readonly Serial MinusOne = new Serial(0xFFFFFFFF);
|
||||
public static readonly Serial Zero = new Serial(0);
|
||||
|
||||
public static Serial LastMobile{ get; private set; } = Zero;
|
||||
public static Serial LastMobile { get; private set; } = Zero;
|
||||
|
||||
public static Serial LastItem{ get; private set; } = 0x40000000;
|
||||
public static Serial LastItem { get; private set; } = 0x40000000;
|
||||
|
||||
public static Serial NewMobile
|
||||
{
|
||||
|
|
@ -57,7 +57,7 @@ namespace Server
|
|||
|
||||
private Serial(uint serial) => Value = serial;
|
||||
|
||||
public uint Value{ get; }
|
||||
public uint Value { get; }
|
||||
|
||||
public bool IsMobile => Value > 0 && Value < 0x40000000;
|
||||
|
||||
|
|
@ -97,5 +97,9 @@ namespace Server
|
|||
public static implicit operator uint(Serial a) => a.Value;
|
||||
|
||||
public static implicit operator Serial(uint a) => new Serial(a);
|
||||
|
||||
public bool Equals(Serial other) => Value == other.Value;
|
||||
|
||||
public int ToInt32() => (int)Value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue