Really fix parsing double and floats, Also added to BNetServer just to make sure.

This commit is contained in:
hondacrx
2018-01-03 12:37:20 -05:00
parent 28c0ef9d03
commit 8b43b08f6f
2 changed files with 9 additions and 3 deletions
+5
View File
@@ -20,6 +20,7 @@ using Framework.Configuration;
using Framework.Database; using Framework.Database;
using Framework.Networking; using Framework.Networking;
using System; using System;
using System.Globalization;
using System.Timers; using System.Timers;
namespace BNetServer namespace BNetServer
@@ -28,6 +29,10 @@ namespace BNetServer
{ {
static void Main() static void Main()
{ {
//Set Culture
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Console.CancelKeyPress += (o, e) => Console.CancelKeyPress += (o, e) =>
{ {
Global.RealmMgr.Close(); Global.RealmMgr.Close();
+4 -3
View File
@@ -33,6 +33,10 @@ namespace WorldServer
static void Main() static void Main()
{ {
//Set Culture
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
Console.CancelKeyPress += (o, e) => Global.WorldMgr.StopNow(ShutdownExitCode.Shutdown); Console.CancelKeyPress += (o, e) => Global.WorldMgr.StopNow(ShutdownExitCode.Shutdown);
if (!ConfigMgr.Load(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".conf")) if (!ConfigMgr.Load(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".conf"))
@@ -73,9 +77,6 @@ namespace WorldServer
Global.WorldMgr.GetRealm().PopulationLevel = 0.0f; Global.WorldMgr.GetRealm().PopulationLevel = 0.0f;
Global.WorldMgr.GetRealm().Flags = Global.WorldMgr.GetRealm().Flags & ~RealmFlags.VersionMismatch; Global.WorldMgr.GetRealm().Flags = Global.WorldMgr.GetRealm().Flags & ~RealmFlags.VersionMismatch;
//Set Culture
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
//- Launch CliRunnable thread //- Launch CliRunnable thread
if (ConfigMgr.GetDefaultValue("Console.Enable", true)) if (ConfigMgr.GetDefaultValue("Console.Enable", true))
{ {