Skip to content

Commit

Permalink
Fix more invalid liege entries being outputted
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Jan 8, 2025
1 parent 09545b8 commit 9c8ca61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Titles/LandedTitles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public void CleanUpHistory(CharacterCollection characters, Date ck3BookmarkDate)
// and move the liege entry to that date.
liegeTitle.History.Fields.TryGetValue("holder", out var liegeHolderField);
Date? laterDate = liegeHolderField?.DateToEntriesDict
.Where(kvp => kvp.Value.Count != 0 && kvp.Key > date && kvp.Key <= ck3BookmarkDate)
.Where(kvp => kvp.Key > date && kvp.Key <= ck3BookmarkDate && kvp.Value.Count != 0 && kvp.Value[^1].Value.ToString() != "0")
.Min(kvp => kvp.Key);

if (laterDate == null) {
Expand Down

0 comments on commit 9c8ca61

Please sign in to comment.