diff --git a/Libraries/SPTarkov.Server.Assets/Assets/database/templates/profiles.json b/Libraries/SPTarkov.Server.Assets/Assets/database/templates/profiles.json index 6303ca00..80edee3c 100644 --- a/Libraries/SPTarkov.Server.Assets/Assets/database/templates/profiles.json +++ b/Libraries/SPTarkov.Server.Assets/Assets/database/templates/profiles.json @@ -47574,7 +47574,9 @@ "equipment": "5fe49444ae6628187a2e77b8", "fastPanel": {}, "favoriteItems": [], - "hideoutAreaStashes": {}, + "hideoutAreaStashes": { + "16": "5d494a295b56502f18c98a08" + }, "items": [{ "_id": "5fe49444ae6628187a2e77b8", "_tpl": "55d7217a4bdc2d86028b456d" @@ -47582,6 +47584,9 @@ "_id": "63db64cbf9963741dc0d741f", "_tpl": "6401c7b213d9b818bf0e7dd7" }, { + "_id": "5d494a295b56502f18c98a08", + "_tpl": "63dbd45917fff4dee40fe16e" + }, { "_id": "676db384777490e23c45b657", "_tpl": "673c7b00cbf4b984b5099181" }, { @@ -50992,7 +50997,9 @@ "equipment": "5fe49444ae6628187a2e77b8", "fastPanel": {}, "favoriteItems": [], - "hideoutAreaStashes": {}, + "hideoutAreaStashes": { + "16": "5d494a295b56502f18c98a08" + }, "items": [{ "_id": "5fe49444ae6628187a2e77b8", "_tpl": "55d7217a4bdc2d86028b456d" @@ -51003,6 +51010,9 @@ "_id": "676db384777490e23c45b657", "_tpl": "673c7b00cbf4b984b5099181" }, { + "_id": "5d494a295b56502f18c98a08", + "_tpl": "63dbd45917fff4dee40fe16e" + }, { "_id": "f5e6bdac05e699d687993249", "_tpl": "5857a8bc2459772bad15db29", "parentId": "5fe49444ae6628187a2e77b8", diff --git a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs index 73f6b26c..bc607252 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs @@ -283,8 +283,8 @@ public class HideoutController( // Don't inform client when upgraded area is hall of fame or equipment stand, BSG doesn't inform client this specific upgrade has occurred // will break client if sent - HashSet check = [HideoutAreas.PlaceOfFame]; - if (!check.Contains(dbHideoutArea.Type ?? HideoutAreas.NotSet)) + + if (ShouldAddContainerUpgradeToClientResponse(dbHideoutArea, profileParentHideoutArea.Level.GetValueOrDefault(1))) { AddContainerUpgradeToClientOutput(sessionId, keyForHideoutAreaStash, dbHideoutArea, hideoutStage, output); } @@ -315,6 +315,22 @@ public class HideoutController( } } + /// + /// Should the newly completed hideout area container upgrade/addition be included in client response + /// Deny when: area is place of fame + we're upgrading to level 1 + /// + /// Hideout area upgraded + /// Level of area upgraded to + /// True = it should be included + private bool ShouldAddContainerUpgradeToClientResponse(HideoutArea dbHideoutArea, int areaLevel) + { + HashSet areaBlacklist = [HideoutAreas.PlaceOfFame]; + var isOnAreaBlacklist = areaBlacklist.Contains(dbHideoutArea.Type ?? HideoutAreas.NotSet); + var isFirstStage = areaLevel == 1; + + return isOnAreaBlacklist && !isFirstStage; + } + /// /// Add an inventory item to profile from a hideout area stage data ///