Browse Source

登录优化

guodong 3 years ago
parent
commit
c7b05259be

+ 2 - 5
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -47,14 +47,11 @@ namespace GFGGame
                     }
                     return true;
                 }
-                else if(LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL)
+                else if(LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL && PlayerPrefs.HasKey(GameConst.PASSWORD_LAST_LOGIN_KEY))
                 {
                     if(doLogin)
                     {
-                        if(PlayerPrefs.HasKey(GameConst.PASSWORD_LAST_LOGIN_KEY))
-                        {
-                            LoginController.LoginTest(account).Coroutine();
-                        }
+                        LoginController.LoginTest(account).Coroutine();
                     }
                     return true;
                 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Session/SessionComponentSystem.cs

@@ -13,6 +13,7 @@
 		public static void Disconnect(this SessionComponent self)
         {
 			self.Session?.GetComponent<DisConnectedCompnent>()?.CancelAlert();
+			self.Session?.Dispose();
 		}
     }
 }