示例#1
0
        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);
        }
示例#2
0
        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());
        }
示例#3
0
        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());
        }
示例#5
0
 public void ToStringTest()
 {
     ExitStatus status = new ExitStatus("myExitCode", "myExitDescription");
     Assert.AreEqual("(exitCode=myExitCode;exitDescription=myExitDescription)", status.ToString());
 }