From 50413eb420dd9a2f9eb1e336ec35dd2fb8b476d5 Mon Sep 17 00:00:00 2001 From: neru Date: Sat, 11 Apr 2026 15:50:51 -0300 Subject: [PATCH] feat: fix bloodweb for spoofed inventories --- src/unlocker/spoofing.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/unlocker/spoofing.cpp b/src/unlocker/spoofing.cpp index 6e90249..492ca65 100644 --- a/src/unlocker/spoofing.cpp +++ b/src/unlocker/spoofing.cpp @@ -574,6 +574,28 @@ void Spoofer::onBloodweb(std::string& body, std::string& respHeaders) } } + /* + bloodweb fixup for perks + (if all perks are unlocked, the game will interpret bloodwebs with perks as invalid so perks will be replaced with PLACEHOLDER_ITEMID) + */ + if (_config.spoofInventory) + { + if (doc.contains("bloodWebData") && doc["bloodWebData"].contains("ringData")) + { + for (auto& ring : doc["bloodWebData"]["ringData"]) + { + if (!ring.contains("nodeData")) continue; + for (auto& node : ring["nodeData"]) + { + if (!node.contains("contentId")) continue; + std::string contentId = node["contentId"]; + if (_camperPerkIds.contains(contentId) || _slasherPerkIds.contains(contentId)) + node["contentId"] = PLACEHOLDER_ITEMID; + } + } + } + } + modifyCharacterData(doc); body = doc.dump(); #ifdef _DEBUG