Esempio n. 1
0
        /// <summary>
        ///     This updates our internal buffer.
        /// </summary>
        private void updateBuffer()
        {
            updateOffsetArray();
            structure = MemoryHandler.Instance.CreateStructFromAddress <CHATLOGINFO>(address);
            int currentArrayIndex = (structure.ArrayCurrent - structure.ArrayStart) / 4;

            // I forgot why we did this
            if (currentArrayIndex < previousArrayIndex)
            {
                buffer.AddRange(ReadEntries(previousArrayIndex, (int)Constants.CHATLOG_ARRAY_SIZE));
                previousOffset     = 0;
                previousArrayIndex = 0;
            }
            if (previousArrayIndex < currentArrayIndex)
            {
                buffer.AddRange(ReadEntries(previousArrayIndex, currentArrayIndex));
            }
            previousArrayIndex = currentArrayIndex;
        }
Esempio n. 2
0
 public Chatlog(CHATLOGINFO structure, IntPtr address)
     : base(structure, address)
 {
     Initialize();
 }
Esempio n. 3
0
 public Chatlog(CHATLOGINFO _structure, IntPtr _address)
 {
     structure = _structure;
     address = _address;
 }
Esempio n. 4
0
 public Chatlog(CHATLOGINFO _structure, IntPtr _address)
 {
     structure = _structure;
     address   = _address;
 }
Esempio n. 5
0
        /// <summary>
        ///     This updates our internal buffer.
        /// </summary>
        private void updateBuffer()
        {
            updateOffsetArray();
            structure = MemoryHandler.Instance.CreateStructFromAddress<CHATLOGINFO>(address);
            int currentArrayIndex = (structure.ArrayCurrent - structure.ArrayStart)/4;

            // I forgot why we did this
            if (currentArrayIndex < previousArrayIndex)
                {
                    buffer.AddRange(ReadEntries(previousArrayIndex, (int) Constants.CHATLOG_ARRAY_SIZE));
                    previousOffset = 0;
                    previousArrayIndex = 0;
                }
            if (previousArrayIndex < currentArrayIndex)
                buffer.AddRange(ReadEntries(previousArrayIndex, currentArrayIndex));
            previousArrayIndex = currentArrayIndex;
        }