mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-12-28 22:20:04 +00:00
Implement redeem codes
This commit is contained in:
@@ -578,6 +578,12 @@ void TableData::loadDrops() {
|
||||
ItemManager::NanoCapsules[(int)capsule["Crate"]] = (int)capsule["Nano"];
|
||||
}
|
||||
#endif
|
||||
nlohmann::json codes = dropData["Codes"];
|
||||
for (nlohmann::json::iterator _code = codes.begin(); _code != codes.end(); _code++) {
|
||||
auto code = _code.value();
|
||||
std::pair<int32_t, int32_t> item = std::make_pair((int)code["Id"], (int)code["Type"]);
|
||||
ItemManager::CodeItems[code["Code"]] = item;
|
||||
}
|
||||
|
||||
std::cout << "[INFO] Loaded " << ItemManager::Crates.size() << " Crates containing "
|
||||
<< itemCount << " items" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user