From c6e3d0e905d9c87483f4b8887be6c4d68dcb6f9f Mon Sep 17 00:00:00 2001 From: Michael VanOverbeek Date: Tue, 30 May 2017 00:20:19 +0000 Subject: [PATCH] Really you long-ass nerd, Michael... --- ShiftOS.Server/RandomUserGenerator.cs | 2 +- ShiftOS.Server/SaveManager.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ShiftOS.Server/RandomUserGenerator.cs b/ShiftOS.Server/RandomUserGenerator.cs index 3a62f9c..6da891d 100644 --- a/ShiftOS.Server/RandomUserGenerator.cs +++ b/ShiftOS.Server/RandomUserGenerator.cs @@ -111,7 +111,7 @@ namespace ShiftOS.Server break; } - sve.Codepoints = rnd.Next(startCP, maxAmt); + sve.Codepoints = (ulong)rnd.Next(startCP, maxAmt); //FS treasure generation. /* diff --git a/ShiftOS.Server/SaveManager.cs b/ShiftOS.Server/SaveManager.cs index 2a94fb1..cb2e1ba 100644 --- a/ShiftOS.Server/SaveManager.cs +++ b/ShiftOS.Server/SaveManager.cs @@ -288,7 +288,7 @@ namespace ShiftOS.Server { args["username"] = args["username"].ToString().ToLower(); string userName = args["username"] as string; - long cpAmount = (long)args["amount"]; + ulong cpAmount = (ulong)args["amount"]; if (Directory.Exists("saves")) { @@ -322,7 +322,7 @@ namespace ShiftOS.Server args["username"] = args["username"].ToString().ToLower(); string userName = args["username"] as string; string passw = args["password"] as string; - int cpAmount = (int)args["amount"]; + ulong cpAmount = (ulong)args["amount"]; if (Directory.Exists("saves")) { @@ -335,7 +335,7 @@ namespace ShiftOS.Server WriteEncFile(saveFile, JsonConvert.SerializeObject(saveFileContents, Formatting.Indented)); Program.ClientDispatcher.Broadcast("update_your_cp", new { username = userName, - amount = -cpAmount + amount = -(long)cpAmount }); Program.ClientDispatcher.DispatchTo("update_your_cp", guid, new {