|
@@ -195,33 +195,41 @@ namespace GFGGame
|
|
|
|
|
|
private void TryLogin()
|
|
|
{
|
|
|
- if (LauncherConfig.serverStatus == 1)
|
|
|
+ var url = LauncherConfig.cfgUrl.Replace("{cfgName}", GameGlobal.cfgName);
|
|
|
+ url = url + "?t=" + TimeHelper.ClientNow();
|
|
|
+ HttpTool.Instance.Get(url, (string data) =>
|
|
|
{
|
|
|
- if (string.IsNullOrEmpty(LauncherConfig.statusPrompt))
|
|
|
+ //重新加载游戏配置
|
|
|
+ GameConfig.InitData(data);
|
|
|
+ if (GameConfig.serverStatus == 1)
|
|
|
{
|
|
|
- LauncherConfig.statusPrompt = "游戏正在维护中,请稍后再试。";
|
|
|
- }
|
|
|
- Alert.Show(LauncherConfig.statusPrompt)
|
|
|
- .SetLeftButton(true, "知道了", (data) =>
|
|
|
+ if (string.IsNullOrEmpty(GameConfig.statusPrompt))
|
|
|
{
|
|
|
- Application.Quit();
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- var serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
|
|
|
- if (serverInfosComponent.ServerInfoList.Count <= 0)
|
|
|
- {
|
|
|
- QDManager.Login();
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- if (!_ui.m_btnAgree.selected)
|
|
|
- {
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("请仔细阅读并同意游戏用户协议、隐私保护指引、儿童隐私政策");
|
|
|
+ GameConfig.statusPrompt = "游戏正在更新维护中,请稍后再试。";
|
|
|
+ }
|
|
|
+ AlertSystem.Show(GameConfig.statusPrompt)
|
|
|
+ .SetLeftButton(true, "知道了", (data) =>
|
|
|
+ {
|
|
|
+ Application.Quit();
|
|
|
+ });
|
|
|
return;
|
|
|
}
|
|
|
- LoginController.GetRoles().Coroutine();
|
|
|
- }
|
|
|
+
|
|
|
+ var serverInfosComponent = GameGlobal.zoneScene.GetComponent<ServerInfosComponent>();
|
|
|
+ if (serverInfosComponent.ServerInfoList.Count <= 0)
|
|
|
+ {
|
|
|
+ QDManager.Login();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if (!_ui.m_btnAgree.selected)
|
|
|
+ {
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("请仔细阅读并同意游戏用户协议、隐私保护指引、儿童隐私政策");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ LoginController.GetRoles().Coroutine();
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
private void ResetLoginButton()
|