示例#1
0
 protected virtual void OnLobbyChatMessage(LobbyChatMsg_t result)
 {
     if (result.m_ulSteamIDLobby != this._lobby.Id.m_SteamID || result.m_eChatEntryType != 1 || result.m_ulSteamIDUser != this._lobby.Owner.m_SteamID)
     {
         return;
     }
     byte[] message = this._lobby.GetMessage((int)result.m_iChatID);
     if (message.Length == 0)
     {
         return;
     }
     using (MemoryStream memoryStream = new MemoryStream(message))
     {
         using (BinaryReader binaryReader = new BinaryReader((Stream)memoryStream))
         {
             if (binaryReader.ReadByte() != (byte)1)
             {
                 return;
             }
             while ((long)message.Length - memoryStream.Position >= 8L)
             {
                 CSteamID userId;
                 ((CSteamID) ref userId).\u002Ector(binaryReader.ReadUInt64());
                 if (CSteamID.op_Inequality(userId, SteamUser.GetSteamID()))
                 {
                     this._lobby.SetPlayedWith(userId);
                 }
             }
         }
     }
 }