aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-05-30 00:20:19 +0000
committerMichael VanOverbeek <[email protected]>2017-05-30 00:20:19 +0000
commitc6e3d0e905d9c87483f4b8887be6c4d68dcb6f9f (patch)
tree574e6acf0e36be6b9d3f7ec910fa49a2f455d55d
parentb35e50e7ef0b34baa1151aa397311ae1f7865dd2 (diff)
downloadshiftos_thereturn-c6e3d0e905d9c87483f4b8887be6c4d68dcb6f9f.tar.gz
shiftos_thereturn-c6e3d0e905d9c87483f4b8887be6c4d68dcb6f9f.tar.bz2
shiftos_thereturn-c6e3d0e905d9c87483f4b8887be6c4d68dcb6f9f.zip
Really you long-ass nerd, Michael...
-rw-r--r--ShiftOS.Server/RandomUserGenerator.cs2
-rw-r--r--ShiftOS.Server/SaveManager.cs6
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
{