diff --git a/Utils/LogWatcher.cs b/Utils/LogWatcher.cs index f239902..61ce6b2 100644 --- a/Utils/LogWatcher.cs +++ b/Utils/LogWatcher.cs @@ -107,7 +107,7 @@ private void LogTick(object? sender, EventArgs? e) } if (SkipParsedLogs) - SetParsedPos(logContext.DateKey, logContext.Position, firstRun); + SetParsedPos(logContext.DateKey, isOlder ? logContext.Position : logContext.RoomReadPos, firstRun); } } @@ -246,6 +246,8 @@ private bool ParseLocation(string line, DateTime lineDate, LogContext logContext var worldName = line.Substring(index).Trim('\n', '\r'); logContext.Enter(worldName, lineDate); + logContext.RoomReadPos = logContext.Position; + return true; } @@ -299,6 +301,7 @@ public class LogContext public string? DisplayName; // Recent Instance info + public long RoomReadPos { get; set; } public string? RoomName { get; private set; } public DateTime RoomDate { get; private set; } public readonly HashSet Players;