Ejemplo n.º 1
0
    void LoadChatLogInfo()
    {
        byte[] data = RuntimeInfo.GetLocalChatFile(RuntimeInfo.GetChatLogFileName(PlayerRole.Instance.RoleInfo.RoleMe.GetUserID(), m_UserID));
        if (data == null)
        {
            return;
        }
        System.IO.MemoryStream ms = new System.IO.MemoryStream(data);
        System.IO.BinaryReader br = new System.IO.BinaryReader(ms);
        uint logNum = br.ReadUInt32();

        for (int i = 0; i < logNum; ++i)
        {
            ChatInfo info = new ChatInfo();
            info.m_IsMySelf = br.ReadByte();
            info.m_UserID   = br.ReadUInt32();
            info.m_DataTime = br.ReadString();
            info.m_ChatStr  = br.ReadString();
            m_ChatLogList.Add(info);
        }

        ms.Close();
        br.Close();
    }