Compare commits
1 Commits
6b63d54eb8
...
v0.1.28
| Author | SHA1 | Date | |
|---|---|---|---|
| 7427357bc5 |
@@ -109,10 +109,11 @@ bool Spoofer::parseCatalog(std::string data)
|
||||
auto extractIds = [&](const std::string& key, std::unordered_set<std::string>& targetSet) {
|
||||
if (catalogData.contains(key) && catalogData[key].contains("items"))
|
||||
for (const auto& id : catalogData[key]["items"])
|
||||
if (id.is_string())
|
||||
targetSet.insert(id.get<std::string>());
|
||||
else
|
||||
Log::warning("Catalog missing or invalid category: {}", key);
|
||||
{
|
||||
if (id.is_string()) targetSet.insert(id.get<std::string>());
|
||||
}
|
||||
else
|
||||
Log::warning("Catalog missing or invalid category: {}", key);
|
||||
};
|
||||
|
||||
extractIds("item", _catalogItemIds);
|
||||
@@ -142,10 +143,11 @@ bool Spoofer::parseStackable(std::string data, std::unordered_set<std::string>&
|
||||
auto populate = [&](const std::string& key, std::unordered_set<std::string>& targetSet) {
|
||||
if (doc.contains(key) && doc[key].is_array())
|
||||
for (const auto& item : doc[key])
|
||||
if (item.is_string())
|
||||
targetSet.insert(item.get<std::string>());
|
||||
else
|
||||
Log::warning("Missing stackables array ({})", key);
|
||||
{
|
||||
if (item.is_string()) targetSet.insert(item.get<std::string>());
|
||||
}
|
||||
else
|
||||
Log::warning("Missing stackables array ({})", key);
|
||||
};
|
||||
|
||||
populate("Slashers", slasherSet);
|
||||
@@ -271,7 +273,7 @@ void Spoofer::modifyCharacterData(json& js)
|
||||
/*
|
||||
ghost node hotfix (untested)
|
||||
*/
|
||||
/* if (js.contains("bloodWebData") && js["bloodWebData"].contains("ringData"))
|
||||
/* if (js.contains("bloodWebData") && js["bloodWebData"].contains("ringData"))
|
||||
{
|
||||
auto& ringData = js["bloodWebData"]["ringData"];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user