Fixes for Last Moved (#194)
This commit is contained in:
parent
3a081d5322
commit
b476bcfd24
28 changed files with 155 additions and 398 deletions
|
|
@ -121,8 +121,8 @@ namespace Server
|
|||
|
||||
private static readonly Stack<ConsoleColor> m_ConsoleColors = new Stack<ConsoleColor>();
|
||||
|
||||
public static Encoding UTF8 => m_UTF8 ?? (m_UTF8 = new UTF8Encoding(false, false));
|
||||
public static Encoding UTF8WithEncoding => m_UTF8WithEncoding ?? (m_UTF8WithEncoding = new UTF8Encoding(true, false));
|
||||
public static Encoding UTF8 => m_UTF8 ??= new UTF8Encoding(false, false);
|
||||
public static Encoding UTF8WithEncoding => m_UTF8WithEncoding ??= new UTF8Encoding(true, false);
|
||||
|
||||
public static void Separate(StringBuilder sb, string value, string separator)
|
||||
{
|
||||
|
|
@ -139,6 +139,9 @@ namespace Server
|
|||
str = Intern(str);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static string IsNullOrDefault(this string value, string def) => value?.Length > 0 ? value : def;
|
||||
|
||||
public static IPAddress Intern(IPAddress ipAddress)
|
||||
{
|
||||
_ipAddressTable ??= new Dictionary<IPAddress, IPAddress>();
|
||||
|
|
@ -835,9 +838,6 @@ namespace Server
|
|||
&& p1.Y >= p2.Y - 18
|
||||
&& p1.Y <= p2.Y + 18;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static int Coerce(int number, int min, int max) => number < min ? min : number > max ? max : number;
|
||||
|
||||
// 4d6+8 would be: Utility.Dice( 4, 6, 8 )
|
||||
public static int Dice(uint amount, uint sides, int bonus)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue