Skip to content

Commit d0acd20

Browse files
authored
1 parent 00158a1 commit d0acd20

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ImperatorToCK3/CK3/Titles/LandedTitles.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,13 @@ public void ImportImperatorHoldings(ProvinceCollection ck3Provinces, Imperator.C
458458
.Select(t=>t.CapitalCounty?.CapitalBaronyId ?? t.CapitalBaronyId)
459459
.ToImmutableHashSet();
460460

461+
// Dukes and above should be excluded from having their holdings converted.
462+
// Otherwise, governors with holdings would own parts of other governorships.
463+
var dukeAndAboveIds = titlesThatHaveHolders
464+
.Where(t => t.Rank >= TitleRank.duchy)
465+
.Select(t => t.GetHolderId(conversionDate))
466+
.ToImmutableHashSet();
467+
461468
var baronies = this.Where(t => t.Rank == TitleRank.barony).ToImmutableHashSet();
462469
var countyCapitalBaronies = baronies
463470
.Where(b => b.DeJureLiege?.CapitalBaronyId == b.Id)
@@ -492,6 +499,9 @@ public void ImportImperatorHoldings(ProvinceCollection ck3Provinces, Imperator.C
492499
if (ck3Owner is null) {
493500
continue;
494501
}
502+
if (dukeAndAboveIds.Contains(ck3Owner.Id)) {
503+
continue;
504+
}
495505

496506
var realm = ck3Owner.ImperatorCharacter?.HomeCountry?.CK3Title;
497507
var deFactoLiege = realm;

0 commit comments

Comments
 (0)