From 91f97a65b2c6d1fad3a211a6739a49d9908f69a2 Mon Sep 17 00:00:00 2001 From: Michael VanOverbeek Date: Wed, 15 Feb 2017 21:30:58 +0000 Subject: whoa mud refactoring --- ShiftOS.Server/SaveManager.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ShiftOS.Server/SaveManager.cs') diff --git a/ShiftOS.Server/SaveManager.cs b/ShiftOS.Server/SaveManager.cs index 785bdec..fcca2bb 100644 --- a/ShiftOS.Server/SaveManager.cs +++ b/ShiftOS.Server/SaveManager.cs @@ -13,7 +13,7 @@ namespace ShiftOS.Server { public static class SaveManager { - [MudRequest("usr_getcp")] + [MudRequest("usr_getcp", typeof(Dictionary))] public static void GetCodepoints(string guid, object contents) { var args = contents as Dictionary; @@ -34,7 +34,7 @@ namespace ShiftOS.Server } - [MudRequest("mud_login")] + [MudRequest("mud_login", typeof(Dictionary))] public static void UserLogin(string guid, object contents) { var args = contents as Dictionary; @@ -78,7 +78,7 @@ namespace ShiftOS.Server } - [MudRequest("mud_checkuserexists")] + [MudRequest("mud_checkuserexists", typeof(Dictionary))] public static void CheckUserExists(string guid, object contents) { var args = contents as Dictionary; @@ -120,10 +120,10 @@ namespace ShiftOS.Server } - [MudRequest("mud_save")] + [MudRequest("mud_save", typeof(Save))] public static void SaveGame(string guid, object contents) { - var sav = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(contents)); + var sav = contents as Save; WriteEncFile("saves/" + sav.Username + ".save", JsonConvert.SerializeObject(sav, Formatting.Indented)); @@ -139,7 +139,7 @@ namespace ShiftOS.Server catch { } } - [MudRequest("usr_givecp")] + [MudRequest("usr_givecp", typeof(Dictionary))] public static void GiveCodepoints(string guid, object contents) { var args = contents as Dictionary; @@ -171,7 +171,7 @@ namespace ShiftOS.Server } - [MudRequest("usr_takecp")] + [MudRequest("usr_takecp", typeof(Dictionary))] public static void TakeCodepoints(string guid, object contents) { var args = contents as Dictionary; -- cgit v1.2.3