static int SetServerIP(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); string arg0 = LuaScriptMgr.GetLuaString(L, 1); LoginIDManager.SetServerIP(arg0); return(0); }
//CDKeyÑéÖ¤»Ø¸´ÏûÏ¢´¦Àí void VerifyCDKeyRespHandle(Pack pack) { Debug.Log("---------------------VerifyCDKeyRespHandle"); VerifyCDKeyResp resp = Serializer.Deserialize <VerifyCDKeyResp>(new MemoryStream(pack.buffer)); if (resp.result != 0) { Debug.Log("Error -- VerifyCDKeyResp returns error: " + resp.result); GameSystem.Instance.mNetworkManager.StopAutoReconn(); if (resp.result == (uint)ErrorID.LOGIN_SERVER_CLOSED) { CommonFunction.ShowPopupMsg(DynamicStringManager.Instance.LoginServerClosedString, null, GameSystem.Instance.mNetworkManager.ReturnToLogin); } else { CommonFunction.ShowErrorMsg((ErrorID)resp.result, null, GameSystem.Instance.mNetworkManager.ReturnToLogin); } return; } //¹Ø±ÕLoginNetµÄÁ¬½Ó GameSystem.Instance.mNetworkManager.CloseLoginConn(); //¼Ç¼µÇ¼ÐÅÏ¢ PlatNetwork.Instance.SaveCDKeyRespResult(resp); //½¨Á¢PlatServerÁ¬½Ó string platIP = resp.ip; uint platPort = resp.port; if (platIP != null && platIP != "") { PlatNetwork.Instance.ConnectToPS(platIP, platPort); LoginIDManager.SetServerIP(platIP); } }