From 14ab3267f4c87ce23fb80049397791cde3fe5811 Mon Sep 17 00:00:00 2001 From: neckfire Date: Wed, 15 Jul 2026 02:15:13 +0200 Subject: [PATCH] fix(shop): don't treat ContractLockPurchase sentinel 'None' as a real lock Regression from the contract-lock feature: the check gated on any non-empty ContractLockPurchase, but the blueprint data uses the string "None" (not "") for items with no lock (749/773 items). So virtually every item returned 'Item is locked' before the currency deduction -> players couldn't buy anything (error shown, K-Marks unchanged). Skip the gate when the value is null/empty/"None". Co-Authored-By: Claude Opus 4.8 --- .../CloudScript/Functions/PurchaseWeaponShopItem.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Prospect.Server.Api/Services/CloudScript/Functions/PurchaseWeaponShopItem.cs b/src/Prospect.Server.Api/Services/CloudScript/Functions/PurchaseWeaponShopItem.cs index 8df29de..a07f08d 100644 --- a/src/Prospect.Server.Api/Services/CloudScript/Functions/PurchaseWeaponShopItem.cs +++ b/src/Prospect.Server.Api/Services/CloudScript/Functions/PurchaseWeaponShopItem.cs @@ -155,12 +155,14 @@ public class PurchaseWeaponShopItemFunction : ICloudScriptFunction(userData["ContractsOneTimeCompleted"].Value); - if (completed?.ContractsIDs == null || !completed.ContractsIDs.Contains(blueprintData.UnlockData.ContractLockPurchase)) + if (completed?.ContractsIDs == null || !completed.ContractsIDs.Contains(contractLockPurchase)) { return new PurchaseWeaponShopItemResponse {