guodong 3 жил өмнө
parent
commit
739a754473

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

@@ -51,7 +51,10 @@ namespace GFGGame
                 {
                     if(doLogin)
                     {
-                        LoginController.LoginTest(account).Coroutine();
+                        if(PlayerPrefs.HasKey(GameConst.PASSWORD_LAST_LOGIN_KEY))
+                        {
+                            LoginController.LoginTest(account).Coroutine();
+                        }
                     }
                     return true;
                 }
@@ -141,7 +144,7 @@ namespace GFGGame
             StudioDataManager.Instance.Clear();
             StorageDataManager.Instance.Clear();
             RechargeDataManager.Instance.Clear();
-            GameGlobal.zoneScene.GetComponent<SessionComponent>()?.Session?.Dispose();
+            GameGlobal.zoneScene.GetComponent<SessionComponent>()?.Disconnect();
             GameGlobal.zoneScene.GetComponent<ServerInfosComponent>()?.ServerInfoList?.Clear();
             if (logout)
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/LoginController.cs

@@ -40,7 +40,7 @@ namespace GFGGame
                 else
                 {
                     PlayerPrefs.SetString(GameConst.ACCOUNT_LAST_LOGIN_KEY, account);
-                    PlayerPrefs.DeleteKey(GameConst.PASSWORD_LAST_LOGIN_KEY);
+                    PlayerPrefs.SetString(GameConst.PASSWORD_LAST_LOGIN_KEY, "");
                 }
                 GameController.CheckSpecialAccount("sygfg");
                 LocalCache.SetBool(GameConst.LAST_LOGIN_IS_VISITOR_KEY, GameGlobal.isVisitor);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ETCodes/Hotfix/App/Login/LoginHelper.cs

@@ -151,7 +151,7 @@ namespace ET
             {
                 return a2C_GetServerInfos.Error;
             }
-
+            zoneScene.GetComponent<ServerInfosComponent>()?.ServerInfoList?.Clear();
             foreach (var serverInfoProto in a2C_GetServerInfos.ServerInfosList)
             {
                 ServerInfo serverInfo = zoneScene.GetComponent<ServerInfosComponent>().AddChild<ServerInfo>();

+ 1 - 3
GameClient/Assets/Game/HotUpdate/Views/Login/LoginView.cs

@@ -127,9 +127,7 @@ namespace GFGGame
 
         private void OnClickBtnLogout()
         {
-            _ui.m_btnLogout.visible = false;
-            GameController.Logout();
-            ViewManager.Show<LoginInputView>();
+            GameController.QuitToLoginView(true);
         }
     }
 }