public void Relogin(string parameters) { if (BuildOption.Instance.IsRunup) { tokens = CommandInterpreter.ExtractValueFromParameterByRunup(parameters); if (tokens != null && tokens.Length > 0) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.RUNUP; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } } } else if (BuildOption.Instance.IsNetmarble) { if (token.Length > 0) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.NETMARBLE; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } } } else { token = CommandInterpreter.ExtractValueFromParameter(parameters, "loginToken", string.Empty); if (token.Length > 0) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.INFERNUM; string a = CommandInterpreter.ExtractValueFromParameter(parameters, "sitecode", string.Empty).ToLower(); if (a == "steam" && !SteamManager.Instance.LoadSteamDll()) { Debug.Log("SteamAPI_Init Failed"); } CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } } } }
private void MoveNext() { if (Application.CanStreamedLevelBeLoaded("Login") && Application.CanStreamedLevelBeLoaded("PlayerInfo") && Application.CanStreamedLevelBeLoaded("BfStart") && Application.CanStreamedLevelBeLoaded("Tos")) { if (BuildOption.Instance.IsRunup) { tokens = CommandInterpreter.ExtractValueFromParameterByRunup(WebParam.Instance.Parameters); if (tokens == null || tokens.Length <= 0) { tokens = CommandInterpreter.ExtractValueFromParameterByRunup(); } if (tokens == null || tokens.Length <= 0) { if (BuildOption.Instance.MustAutoLogin) { BuildOption.Instance.HardExit(); } else { Application.LoadLevel("Login"); } } else { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.RUNUP; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else { if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } step = STEP.AUTO_LOGIN_TO_RUNUP; } } } else { token = CommandInterpreter.ExtractValueFromParameter(WebParam.Instance.Parameters, "loginToken", string.Empty); if (token.Length <= 0) { token = CommandInterpreter.ExtractValueFromParameter("loginToken", string.Empty); } if (BuildOption.Instance.IsNetmarble) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.NETMARBLE; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else { if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } step = STEP.AUTO_LOGIN_TO_NETMARBLE; } } else if (token.Length <= 0) { Application.LoadLevel("Login"); } else { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.INFERNUM; string a = CommandInterpreter.ExtractValueFromParameter("sitecode", string.Empty).ToLower(); if (a == "steam" && !SteamManager.Instance.LoadSteamDll()) { Debug.Log("SteamAPI_Init Failed"); } CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else { if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } step = STEP.AUTO_LOGIN; } } } } }