Exemplo n.º 1
0
        public void InnerRoolBackEnterLobby(SFNETPacket packet)
        {
            try
            {
                var request = JsonEnDecode.Decode <JsonPacketInnerRollBackEnterLobby>(packet.GetData());

                // 로비에 추가
                var error = LobbyManagerRef.LeaveLobby(request.LobbyID, request.UserID);

                if (error == ERROR_CODE.NONE)
                {
                    InnerMessageQueue.CurrentLobbyUserCount(request.LobbyID, LobbyManagerRef.LobbyCurrentUserCount(request.LobbyID));
                }
            }
            catch
            {
            }
        }
Exemplo n.º 2
0
        public void RequestEnterLobby(SFNETPacket packet)
        {
            try
            {
                var request = JsonEnDecode.Decode <JsonPacketRequestEnterLobby>(packet.GetData());

                // 로비에 추가
                var error = LobbyManagerRef.EnterLobby(request.LobbyID, packet.SessionID(), request.UserID);

                if (error == ERROR_CODE.NONE)
                {
                    InnerMessageQueue.CurrentLobbyUserCount(request.LobbyID, LobbyManagerRef.LobbyCurrentUserCount(request.LobbyID));
                }

                ResponseEnterLobby(error, request.LobbyID, request.UserID);
            }
            catch
            {
            }
        }
Exemplo n.º 3
0
        public void RequestLeaveLobby(SFNETPacket packetData)
        {
            try
            {
                var request = JsonEnDecode.Decode <JsonPacketRequestLeaveLobby>(packetData.GetData());

                var result = LobbyManagerRef.LeaveLobby(request.LobbyID, request.UserID);

                if (packetData.SessionID() >= 0)
                {
                    ResponseLeaveLobby(result, request.LobbyID, request.UserID);
                }

                if (result == ERROR_CODE.NONE)
                {
                    InnerMessageQueue.CurrentLobbyUserCount(request.LobbyID, LobbyManagerRef.LobbyCurrentUserCount(request.LobbyID));
                }
            }
            catch
            {
            }
        }