diff --git a/Projects/Server/Gumps/Grid/GumpGrid.cs b/Projects/Server/Gumps/Grid/GumpGrid.cs index 1c5d87118..86e6b26a6 100644 --- a/Projects/Server/Gumps/Grid/GumpGrid.cs +++ b/Projects/Server/Gumps/Grid/GumpGrid.cs @@ -81,7 +81,7 @@ public class GumpGrid : Gump } //percent - var percent = sizes[i].Replace("*", ""); + var percent = sizes[i].RemoveOrdinal("*"); var size = sizes[i] != percent ? len / 100 * int.Parse(percent) : int.Parse(percent); list.Add(new Swap { Index = i, Size = size }); diff --git a/Projects/Server/Main.cs b/Projects/Server/Main.cs index 93ff24d0c..8b83355f8 100644 --- a/Projects/Server/Main.cs +++ b/Projects/Server/Main.cs @@ -530,7 +530,7 @@ public static class Core #if DEBUG const bool idleCPU = true; #else - var idleCPU = ServerConfiguration.GetOrUpdateSetting("core.enableIdleCPU", false); + var idleCPU = ServerConfiguration.GetOrUpdateSetting("core.enableIdleCPU", false); #endif long last = TickCount; diff --git a/Projects/Server/Skills.cs b/Projects/Server/Skills.cs index 6bbb8ebb1..60f534264 100644 --- a/Projects/Server/Skills.cs +++ b/Projects/Server/Skills.cs @@ -401,7 +401,7 @@ public class SkillInfo DexGain = dexGain; IntGain = intGain; GainFactor = gainFactor; - ProfessionSkillName = professionSkillName ?? Name.Replace(" ", ""); + ProfessionSkillName = professionSkillName ?? Name.RemoveOrdinal(" "); StatTotal = strScale + dexScale + intScale; } diff --git a/Projects/UOContent/Assistants/AssistantHandler.cs b/Projects/UOContent/Assistants/AssistantHandler.cs index e31cc2a82..01e12141e 100644 --- a/Projects/UOContent/Assistants/AssistantHandler.cs +++ b/Projects/UOContent/Assistants/AssistantHandler.cs @@ -84,7 +84,7 @@ public static class AssistantHandler // Instead we are supporting razor community edition. var assistVersion = reader.ReadAscii(); - state.Assistant = assistVersion.Contains(' ') ? assistVersion : $"RazorCE {assistVersion}"; + state.Assistant = assistVersion.ContainsOrdinal(' ') ? assistVersion : $"RazorCE {assistVersion}"; } private static void HandshakeResponse(NetState state, CircularBufferReader reader, int packetLength) diff --git a/Projects/UOContent/Misc/ProfessionInfo.cs b/Projects/UOContent/Misc/ProfessionInfo.cs index ad9f4253c..64fffb327 100644 --- a/Projects/UOContent/Misc/ProfessionInfo.cs +++ b/Projects/UOContent/Misc/ProfessionInfo.cs @@ -15,7 +15,7 @@ namespace Server return true; } - var lowerName = name?.ToLowerInvariant().Replace(" ", ""); + var lowerName = name?.ToLowerInvariant().RemoveOrdinal(" "); if (!string.IsNullOrEmpty(lowerName)) { diff --git a/Projects/UOContent/World Saves/AutoArchive.cs b/Projects/UOContent/World Saves/AutoArchive.cs index aaaf57598..801cea14c 100755 --- a/Projects/UOContent/World Saves/AutoArchive.cs +++ b/Projects/UOContent/World Saves/AutoArchive.cs @@ -394,7 +394,7 @@ namespace Server.Saves if (files) { var fileName = new FileInfo(item).Name; - name = fileName[..fileName.IndexOf('.')]; + name = fileName[..fileName.IndexOfOrdinal('.')]; } else {