Moved GC to later in map gen

Store Mongoid correctly
This commit is contained in:
Chomp
2025-08-29 09:48:14 +01:00
parent d3f95de546
commit 307071fa9f
2 changed files with 10 additions and 9 deletions
@@ -141,18 +141,18 @@ public class LocationLifecycleService(
// Clear bot cache ready for bot generation call that occurs after this
botNameService.ClearNameCache();
GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true, true);
// Handle Player Inventory Wiping checks for alt-f4 prevention
HandlePreRaidInventoryChecks(request.PlayerSide, playerProfile.CharacterData.PmcData, sessionId);
GC.Collect(GC.MaxGeneration, GCCollectionMode.Aggressive, true, true);
return result;
}
/// <summary>
/// Handle Pre Raid checks Alt-F4 Prevention and player inventory wiping
/// </summary>
protected void HandlePreRaidInventoryChecks(string playerSide, PmcData pmcData, string sessionId)
protected void HandlePreRaidInventoryChecks(string playerSide, PmcData pmcData, MongoId sessionId)
{
// If config enabled, remove players equipped items to prevent alt-F4 from persisting items
if (!IsSide(playerSide) || !_lostOnDeathConfig.WipeOnRaidStart)