Persist customisations during prestige event #704 (backport)

This commit is contained in:
Chomp
2025-11-29 11:04:17 +00:00
parent b10d1db5da
commit 4390948ff0
@@ -125,6 +125,17 @@ public class PrestigeHelper(
);
}
// Copy over existing unlocked hideout customisation unlocks to new profile that player doesn't already have
newProfile.CustomisationUnlocks ??= [];
foreach (var oldUnlock in oldProfile.CustomisationUnlocks ?? [])
{
if (newProfile.CustomisationUnlocks.FirstOrDefault(unlock => unlock.Id == oldUnlock.Id) is null)
{
newProfile.CustomisationUnlocks.Add(oldUnlock);
}
}
// Set prestige level on new profile
newProfile.CharacterData!.PmcData!.Info!.PrestigeLevel = prestige.PrestigeLevel;
}