상속: global::ProtoBuf.IExtensible
예제 #1
0
        private void HandleQuitRoom(NodeMessage msg, int handle, uint seq)
        {
            GameFrameworkMessage.NodeMessageWithGuid headerMsg = msg.m_NodeHeader as GameFrameworkMessage.NodeMessageWithGuid;
            if (null != headerMsg)
            {
                GameFrameworkMessage.QuitRoom protoMsg = msg.m_ProtoData as GameFrameworkMessage.QuitRoom;
                if (null != protoMsg)
                {
                    ulong  guid            = headerMsg.m_Guid;
                    bool   is_quit_room    = protoMsg.m_IsQuitRoom;
                    byte[] originalMsgData = msg.m_OriginalMsgData;

                    UserInfo user = UserServer.Instance.UserProcessScheduler.GetUserInfo(guid);
                    if (user != null)
                    {
                        if (user.CurrentState == UserState.Room)
                        {
                            UserServer.Instance.ForwardToBigworld(user, originalMsgData);
                        }
                        else
                        {
                            user.CurrentState = UserState.Online;
                        }
                        LogSys.Log(LOG_TYPE.INFO, "QuitRoom Guid {0} state {1}", guid, user.CurrentState);
                    }
                }
            }
        }
 internal void QuitRoom(bool isQuitTeam)
 {
     if (m_Guid != 0)
     {
         NodeMessage msg = new NodeMessage(LobbyMessageDefine.QuitRoom);
         msg.SetHeaderWithGuid(m_Guid);
         GameFrameworkMessage.QuitRoom protoMsg = new GameFrameworkMessage.QuitRoom();
         protoMsg.m_IsQuitRoom = isQuitTeam;
         msg.m_ProtoData       = protoMsg;
         SendMessage(msg);
     }
 }
예제 #3
0
 private void HandleQuitRoom(NodeMessage msg, int handle, uint seq)
 {
     GameFrameworkMessage.NodeMessageWithGuid quitClientMsg = msg.m_NodeHeader as GameFrameworkMessage.NodeMessageWithGuid;
     if (null != quitClientMsg)
     {
         GameFrameworkMessage.QuitRoom protoData = msg.m_ProtoData as GameFrameworkMessage.QuitRoom;
         if (null != protoData)
         {
             m_RoomProcessThread.QueueAction(m_RoomProcessThread.QuitRoom, quitClientMsg.m_Guid, protoData.m_IsQuitRoom, handle);
         }
     }
 }
 internal void QuitRoom(bool isQuitTeam)
 {
     if (m_Guid != 0) {
         NodeMessage msg = new NodeMessage(LobbyMessageDefine.QuitRoom);
         msg.SetHeaderWithGuid(m_Guid);
         GameFrameworkMessage.QuitRoom protoMsg = new GameFrameworkMessage.QuitRoom();
         protoMsg.m_IsQuitRoom = isQuitTeam;
         msg.m_ProtoData = protoMsg;
         SendMessage(msg);
     }
 }