From 4633d885f5d9f6a3b66915ff90b51f073ea662b1 Mon Sep 17 00:00:00 2001 From: Chomp Date: Wed, 31 Dec 2025 09:58:44 +0000 Subject: [PATCH] Fixed locked prestiged items being stuck #717 --- Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs | 7 +++++++ .../SPTarkov.Server.Core/Services/CreateProfileService.cs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs index 0f8b70d2..08cc6d42 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs @@ -105,6 +105,7 @@ public class PrestigeHelper( // Copy transferred items foreach (var transferRequest in prestige.Items ?? []) { + // Get root item var item = prePrestigePmc?.Inventory?.Items?.FirstOrDefault(item => item.Id == transferRequest.Id); if (item is null) { @@ -112,6 +113,12 @@ public class PrestigeHelper( continue; } + if (item.Upd?.PinLockState is PinLockState.Pinned or PinLockState.Locked) + { + // Item has been pinned/locked and needs to be unpinned before sending to player, otherwise they can't transfer item into stash + item.Upd.PinLockState = PinLockState.Free; + } + itemsToTransfer.Add(item); } diff --git a/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs b/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs index 57ca1b5c..ba22bc06 100644 --- a/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/CreateProfileService.cs @@ -177,7 +177,7 @@ public class CreateProfileService( // Process handling if the account is forced to prestige, or if the account currently has any pending prestiges if (request.SptForcePrestigeLevel is not null || account.SptData?.PendingPrestige is not null) { - var pendingPrestige = account.SptData.PendingPrestige ?? new PendingPrestige { PrestigeLevel = request.SptForcePrestigeLevel }; + var pendingPrestige = account.SptData?.PendingPrestige ?? new PendingPrestige { PrestigeLevel = request.SptForcePrestigeLevel }; prestigeHelper.ProcessPendingPrestige(account, profileDetails, pendingPrestige); }