From f8de9c795eb08613208577fa4fef66c106396a53 Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 8 Sep 2025 13:12:45 +0100 Subject: [PATCH] Small perf improvement inside `HandlePreRaidInventoryChecks` --- .../Services/LocationLifecycleService.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs index 6bd248cc..0d5fc5c6 100644 --- a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs @@ -159,7 +159,12 @@ public class LocationLifecycleService( { return; } - logger.Debug("Wiping player inventory on raid start to prevent alt-f4"); + + if (logger.IsLogEnabled(LogLevel.Debug)) + { + logger.Debug("Wiping player inventory on raid start to prevent alt-f4"); + } + inRaidHelper.DeleteInventory(pmcData, sessionId); }