Compare commits
3 Commits
v0.1.10
...
d47271cdc7
| Author | SHA1 | Date | |
|---|---|---|---|
| d47271cdc7 | |||
| cea8141c9c | |||
| 2a34166e38 |
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
|
||||
###### chatgpt generated instructions below
|
||||
###### chatgpt slop instructions below
|
||||
|
||||
## Requirements
|
||||
|
||||
|
||||
+11
-5
@@ -343,7 +343,7 @@ int main()
|
||||
else
|
||||
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> localUnique;
|
||||
@@ -361,7 +361,9 @@ int main()
|
||||
std::unordered_set<std::string> uniqueSet(localUnique.begin(), localUnique.end());
|
||||
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;
|
||||
|
||||
for (const char* arrayKey : targetArrays)
|
||||
@@ -431,9 +433,13 @@ int main()
|
||||
}
|
||||
};
|
||||
|
||||
injectIfMissing(localStackable, 100);
|
||||
injectIfMissing(localUnique, 1);
|
||||
injectIfMissing(localPerks, 3);
|
||||
if (!isBloodweb && (std::string_view(arrayKey) == "\"characterItems\":[" ||
|
||||
std::string_view(arrayKey) == "\"inventory\":["))
|
||||
{
|
||||
injectIfMissing(localStackable, 100);
|
||||
injectIfMissing(localUnique, 1);
|
||||
injectIfMissing(localPerks, 3);
|
||||
}
|
||||
|
||||
data.replace(pos, endPos - pos, currentItems);
|
||||
pos += currentItems.length();
|
||||
|
||||
Reference in New Issue
Block a user