added mob drop id lookup from mob id

This commit is contained in:
FinnHornhoover
2021-04-02 23:34:20 -07:00
committed by Gent Semaj
parent 78b87d0f61
commit 20b05a72a0
3 changed files with 21 additions and 3 deletions

View File

@@ -274,6 +274,14 @@ static void loadDrops() {
};
}
// Mobs
nlohmann::json mobs = dropData["Mobs"];
for (nlohmann::json::iterator _mob = mobs.begin(); _mob != mobs.end(); _mob++) {
auto mob = _mob.value();
Items::MobToDropMap[(int)mob["MobID"]] = (int)mob["MobDropID"];
}
// RarityWeights
nlohmann::json rarityWeights = dropData["RarityWeights"];
for (nlohmann::json::iterator _rarityWeightsObject = rarityWeights.begin(); _rarityWeightsObject != rarityWeights.end(); _rarityWeightsObject++) {