public static void SaveProfileProgress(EFT.Profile profileData, ExitStatus exitStatus, string session, bool isPlayerScav) { var request = new SaveProfileRequest { exit = exitStatus.ToString().ToLower(), profile = profileData, isPlayerScav = isPlayerScav }; var requestData = request.ToJson(); new HttpUtils.Create(session).Post("/OfflineRaidSave", requestData, true); }
public static void SaveProfileProgress(string backendUrl, string session, ExitStatus exitStatus, Profile profileData, bool isPlayerScav) { SaveProfileRequest request = new SaveProfileRequest { exit = exitStatus.ToString().ToLower(), profile = profileData, isPlayerScav = isPlayerScav }; new Request(session, backendUrl).PutJson("/raid/profile/save", request.ToJson()); }
public static void SaveProfileProgress(string backendUrl, string session, ExitStatus exitStatus, Profile profileData, PlayerHealth currentHealth, bool isPlayerScav) { SaveProfileRequest request = new SaveProfileRequest { exit = exitStatus.ToString().ToLower(), profile = profileData, health = currentHealth, isPlayerScav = isPlayerScav }; // ToJson() uses an internal converter which prevents loops and do other internal things new Request(session, backendUrl).PutJson("/raid/profile/save", request.ToJson()); }
public void ToStringTest() { ExitStatus status = new ExitStatus("myExitCode", "myExitDescription"); Assert.AreEqual("(exitCode=myExitCode;exitDescription=myExitDescription)", status.ToString()); }