Exemplo n.º 1
0
    private static void ROOM_SERVER_LOGIN_REPLY(byte[] bytes)
    {
        RoomServerLoginReply input = RoomServerLoginReply.Parser.ParseFrom(bytes);

        if (input.Ret)
        {
            MixedManager.Instance.StateMachine.TriggerTransition(ConnectionFSMStateEnum.StateEnum.CONNECTED);
            MixedManager.Instance.LobbyManager.Log("MSG: LobbyMsgReply ROOM_SERVER_LOGIN_REPLY OK - Room-server logged in succeeded!"); // 房间服务器登录成功!
        }
        else
        {
            MixedManager.Instance.LobbyManager.Log("MSG: LobbyMsgReply ROOM_SERVER_LOGIN_REPLY Error - Room-server logged in failed"); // 房间服务器登录失败!
        }
    }
Exemplo n.º 2
0
    static void ROOM_SERVER_LOGIN(byte[] bytes)
    {
        RoomServerLogin input          = RoomServerLogin.Parser.ParseFrom(bytes);
        RoomServerInfo  roomServerInfo = new RoomServerInfo()
        {
            Login = input,
        };

        ServerLobbyManager.Instance.RoomServers[_args] = roomServerInfo;

        RoomServerLoginReply output = new RoomServerLoginReply()
        {
            Ret = true,
        };

        // 返回消息
        ServerLobbyManager.Instance.SendMsg(_args, LOBBY_REPLY.RoomServerLoginReply, output.ToByteArray());
        ServerLobbyManager.Instance.Log($"MSG: Room-server Logged in! Address:{input.ServerName} - Address Real:{input.AddressReal} - MaxRoomCount:{input.MaxRoomCount} - MaxPlayerPerRoom:{input.MaxPlayerPerRoom}"); // 房间服务器登录成功!
    }