feat: fix bloodweb for spoofed inventories
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user