Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void World::LoadMine()
- {
- this->mine_drops.clear();
- UTIL_UNORDERED_MAP_FOREACH_ALL(this->mining_config, std::string, util::variant, hc)
- {
- std::vector<std::string> parts = util::explode(',', static_cast<std::string>(hc.second));
- if (parts.size() != 3)
- {
- Console::Wrn("skipping invalid mine drop data for item #%i", util::to_int(hc.first));
- continue;
- }
- Mine_Drop *drop(new Mine_Drop);
- drop->item = util::to_int(hc.first);
- drop->chance = util::to_float(parts[0]);
- drop->levelreq = util::to_int(parts[1]);
- drop->exp = util::to_int(parts[2]);
- this->mine_drops.push_back(drop);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement