/// <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; }
public Chatlog(CHATLOGINFO structure, IntPtr address) : base(structure, address) { Initialize(); }
public Chatlog(CHATLOGINFO _structure, IntPtr _address) { structure = _structure; address = _address; }
/// <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; }