Browse Source

断线重连失败处理

guodong 2 years ago
parent
commit
ba4577b2cb

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Controller/ErrorCodeController.cs

@@ -25,8 +25,8 @@ namespace GFGGame
                             {
                                 Application.Quit();
                             });
-                        return false;
                     }
+                    break;
                 case ET.ErrorCode.Err_LoginCountFull:
                     {
                         AlertSystem.Show("游戏已爆满,请稍后再试!")
@@ -61,10 +61,10 @@ namespace GFGGame
                         PromptController.Instance.ShowFloatTextPrompt("errorCode " + errorCode.ToString());
                         ET.Log.Error("errorCode" + errorCode.ToString());
                     }
-                    break;
+                    return true;
 
             }
-            return true;
+            return false;
         }
     }
 }

+ 0 - 10
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -25,9 +25,6 @@ namespace GFGGame
             ViewGlobal.CreatClickEffect();
             //获取游戏配置
             GetGameCfg();
-            //预加载配置数据
-            //InitSqliteData();
-            // InitAllCfgsCache.Instance.InitAll();
         }
 
         /// <summary>
@@ -272,12 +269,5 @@ namespace GFGGame
 
         }
 
-        private static void InitSqliteData()
-        {
-            FunctionOpenCfg[] functionOpenCfgs = FunctionOpenCfgArray.Instance.dataArray;
-            StoryChapterCfg[] storyChapterCfgs = StoryChapterCfgArray.Instance.dataArray;
-            RoleLevelCfg[] roleLevelCfgs = RoleLevelCfgArray.Instance.dataArray;
-            StoryLevelCfg[] storyLevels = StoryLevelCfgArray.Instance.dataArray;
-        }
     }
 }

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

@@ -264,7 +264,12 @@ namespace GFGGame
             int errorCode = await LoginHelper.EnterGame(GameGlobal.zoneScene);
             if (errorCode != ErrorCode.ERR_Success)
             {
-                ErrorCodeController.Handler(errorCode);
+                AlertSystem.Show("与服务器失去连接,请重新进入游戏。")
+                        .SetRightButton(true, "好的", (object data) =>
+                        {
+                            Application.Quit();
+                        });
+                return;
             }
             EventAgent.DispatchEvent(ConstMessage.NUMERIC_CHANGE, NumericType.All);
             //重连成功请求邮件和公告等离线后会变更的数据