Fixed locked prestiged items being stuck #717
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user