Adds official .NET 5 support (#300)
This commit is contained in:
parent
c3289a20ab
commit
013f333898
39 changed files with 496 additions and 668 deletions
|
|
@ -60,12 +60,12 @@ namespace Server
|
|||
}
|
||||
}
|
||||
|
||||
if (fmt.IndexOf("god") >= 0 || fmt.IndexOf("gq") >= 0)
|
||||
if (fmt.IndexOf("god", StringComparison.Ordinal) >= 0 || fmt.IndexOf("gq", StringComparison.Ordinal) >= 0)
|
||||
{
|
||||
Type = ClientType.God;
|
||||
}
|
||||
else if (fmt.IndexOf("third dawn") >= 0 || fmt.IndexOf("uo:td") >= 0 || fmt.IndexOf("uotd") >= 0 ||
|
||||
fmt.IndexOf("uo3d") >= 0 || fmt.IndexOf("uo:3d") >= 0)
|
||||
else if (fmt.IndexOf("third dawn", StringComparison.Ordinal) >= 0 || fmt.IndexOf("uo:td", StringComparison.Ordinal) >= 0 || fmt.IndexOf("uotd", StringComparison.Ordinal) >= 0 ||
|
||||
fmt.IndexOf("uo3d", StringComparison.Ordinal) >= 0 || fmt.IndexOf("uo:3d", StringComparison.Ordinal) >= 0)
|
||||
{
|
||||
Type = ClientType.UOTD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ namespace Server
|
|||
|
||||
public AccessLevel AccessLevel { get; }
|
||||
|
||||
public int CompareTo(CommandEntry e) => e == null ? 1 : Command.CompareTo(e.Command);
|
||||
public int CompareTo(CommandEntry e) => string.CompareOrdinal(Command, e?.Command);
|
||||
}
|
||||
|
||||
public static class CommandSystem
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ namespace Server
|
|||
break;
|
||||
}
|
||||
|
||||
if (ipStr.IndexOf(":", StringComparison.Ordinal) == -1)
|
||||
if (ipStr.IndexOf(':') == -1)
|
||||
{
|
||||
ipStr += ":2593";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,23 +104,13 @@ namespace Server
|
|||
public int CompareTo(Point2D other)
|
||||
{
|
||||
var xComparison = m_X.CompareTo(other.m_X);
|
||||
if (xComparison != 0)
|
||||
{
|
||||
return xComparison;
|
||||
}
|
||||
|
||||
return m_Y.CompareTo(other.m_Y);
|
||||
return xComparison != 0 ? xComparison : m_Y.CompareTo(other.m_Y);
|
||||
}
|
||||
|
||||
public int CompareTo(IPoint2D other)
|
||||
{
|
||||
var xComparison = m_X.CompareTo(other.X);
|
||||
if (xComparison != 0)
|
||||
{
|
||||
return xComparison;
|
||||
}
|
||||
|
||||
return m_Y.CompareTo(other.Y);
|
||||
return xComparison != 0 ? xComparison : m_Y.CompareTo(other.Y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
|
|
@ -63,7 +64,7 @@ namespace Server.Guilds
|
|||
{
|
||||
var name = g.Name.ToLower();
|
||||
|
||||
if (words.All(t => name.IndexOf(t) != -1))
|
||||
if (words.All(t => name.IndexOf(t, StringComparison.Ordinal) != -1))
|
||||
{
|
||||
results.Add(g);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ namespace Server.Network
|
|||
|
||||
public bool IsDisposing => m_Disposing != 0;
|
||||
|
||||
public int CompareTo(NetState other) => other == null ? 1 : m_ToString.CompareTo(other.m_ToString);
|
||||
public int CompareTo(NetState other) => string.CompareOrdinal(m_ToString, other?.m_ToString);
|
||||
|
||||
public void ValidateAllTrades()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
<Delete Files="..\..\Distribution\$(AssemblyName).runtimeconfig.json" ContinueOnError="true" />
|
||||
</Target>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.2.31">
|
||||
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue