Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d47271cdc7 | |||
| cea8141c9c | |||
| 2a34166e38 |
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
###### chatgpt generated instructions below
|
###### chatgpt slop instructions below
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
+11
-5
@@ -343,7 +343,7 @@ int main()
|
|||||||
else
|
else
|
||||||
Log::warning("No catalog data available to inject into global inventory yet!");
|
Log::warning("No catalog data available to inject into global inventory yet!");
|
||||||
}
|
}
|
||||||
else if (url.find("api/v1/dbd-character-data/") != std::string::npos && url.find("/bloodweb") == std::string::npos)
|
else if (url.find("api/v1/dbd-character-data/") != std::string::npos)
|
||||||
{
|
{
|
||||||
std::vector<std::string> localStackable;
|
std::vector<std::string> localStackable;
|
||||||
std::vector<std::string> localUnique;
|
std::vector<std::string> localUnique;
|
||||||
@@ -361,7 +361,9 @@ int main()
|
|||||||
std::unordered_set<std::string> uniqueSet(localUnique.begin(), localUnique.end());
|
std::unordered_set<std::string> uniqueSet(localUnique.begin(), localUnique.end());
|
||||||
std::regex qtyRegex(R"("quantity"\s*:\s*\d+)");
|
std::regex qtyRegex(R"("quantity"\s*:\s*\d+)");
|
||||||
|
|
||||||
const char* targetArrays[] = {"\"characterItems\":[", "\"inventory\":["};
|
const char* targetArrays[] = {"\"characterItems\":[", "\"inventory\":[", "\"bloodwebRewards\":[",
|
||||||
|
"\"prestigeRewards\":["};
|
||||||
|
bool isBloodweb = url.find("/bloodweb") != std::string::npos;
|
||||||
size_t arraysModified = 0;
|
size_t arraysModified = 0;
|
||||||
|
|
||||||
for (const char* arrayKey : targetArrays)
|
for (const char* arrayKey : targetArrays)
|
||||||
@@ -431,9 +433,13 @@ int main()
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
injectIfMissing(localStackable, 100);
|
if (!isBloodweb && (std::string_view(arrayKey) == "\"characterItems\":[" ||
|
||||||
injectIfMissing(localUnique, 1);
|
std::string_view(arrayKey) == "\"inventory\":["))
|
||||||
injectIfMissing(localPerks, 3);
|
{
|
||||||
|
injectIfMissing(localStackable, 100);
|
||||||
|
injectIfMissing(localUnique, 1);
|
||||||
|
injectIfMissing(localPerks, 3);
|
||||||
|
}
|
||||||
|
|
||||||
data.replace(pos, endPos - pos, currentItems);
|
data.replace(pos, endPos - pos, currentItems);
|
||||||
pos += currentItems.length();
|
pos += currentItems.length();
|
||||||
|
|||||||
Reference in New Issue
Block a user