aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-13 13:54:03 -0500
committerMichael <[email protected]>2017-02-13 13:54:03 -0500
commit743f49f1af0b7b2eab093d4e2e5e86137aef7639 (patch)
treed66cf4b27724f513b1ec4bfb41b0cc0fd49a2cc1
parentd54cc313019fee324a9df2601f19e6d56d241eba (diff)
downloadshiftos_thereturn-743f49f1af0b7b2eab093d4e2e5e86137aef7639.tar.gz
shiftos_thereturn-743f49f1af0b7b2eab093d4e2e5e86137aef7639.tar.bz2
shiftos_thereturn-743f49f1af0b7b2eab093d4e2e5e86137aef7639.zip
possible fix for login loop
-rw-r--r--ShiftOS.WinForms/FakeSetupScreen.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/ShiftOS.WinForms/FakeSetupScreen.cs b/ShiftOS.WinForms/FakeSetupScreen.cs
index 8bde718..4f80a48 100644
--- a/ShiftOS.WinForms/FakeSetupScreen.cs
+++ b/ShiftOS.WinForms/FakeSetupScreen.cs
@@ -213,6 +213,8 @@ So make sure your password is secure enough that it can't be guessed, but easy f
currentPage = 12;
SetupUI();
}));
+
+ ServerManager.MessageReceived -= login;
}
else if (msg.Name == "mud_notfound")
{
@@ -221,8 +223,9 @@ So make sure your password is secure enough that it can't be guessed, but easy f
currentPage = 10;
SetupUI();
}));
+
+ ServerManager.MessageReceived -= login;
}
- ServerManager.MessageReceived -= login;
};
ServerManager.MessageReceived += login;
@@ -241,12 +244,16 @@ So make sure your password is secure enough that it can't be guessed, but easy f
getsave = (msg) =>
{
- if (msg.Name == "mud_found")
+ if (msg.Name == "mud_savefile")
{
this.Invoke(new Action(() =>
{
- currentPage = 12;
- SetupUI();
+ SaveSystem.CurrentSave = JsonConvert.DeserializeObject<ShiftOS.Objects.Save>(msg.Contents);
+ SaveSystem.SaveGame();
+ DoneLoggingIn?.Invoke();
+ this.CanClose = true;
+ this.Close();
+
}));
}
else if (msg.Name == "mud_notfound")
@@ -268,9 +275,6 @@ So make sure your password is secure enough that it can't be guessed, but easy f
password = txtlpass.Text
}));
- DoneLoggingIn?.Invoke();
- this.CanClose = true;
- this.Close();
break;
}
}