Exemplo n.º 1
0
    //登录区服回复
    public void Execute(Pmd.UserLoginReturnOkLoginUserPmd_S cmd)
    {
        //var iport = cmd.gatewayurl.Split(':');
        //Log.Info("帐号验证成功,准备连接到网关");
        ////UserData.GameID = cmd.gameid;
        ////UserData.ZoneID = cmd.zoneid;
        //UserData.GatewayServerIP = iport[0];
        //UserData.GatewayServerPort = int.Parse(iport[1]);
        //UserData.AccountID = cmd.accountid;
        //UserData.LoginTempID = cmd.logintempid;
        //NetService.Instance.Close();

        //Log.Info("account: " + UserData.AccountID);

        ////开始连接网关服
        //NetService.Instance.Connect(UserData.GatewayServerIP, UserData.GatewayServerPort, onConnectedGateServer);
    }
Exemplo n.º 2
0
	public static IEnumerator Execute(UserLoginReturnOkLoginUserPmd_S cmd)
	{
		WebSocketClient.Instance.Close(); // 和LoginServer断开连接

		gamewayToken = cmd;
		foreach (var c in ConnectGatewayServer().AsEnumerable())
			yield return c;
	}