Fix NPC visibility and stabilize world transport/taxi updates

This commit is contained in:
Kelsi 2026-02-11 18:25:04 -08:00
parent 5dae994830
commit f752a4f517
16 changed files with 452 additions and 173 deletions

View file

@ -2,6 +2,7 @@
#include "core/logger.hpp"
#include <cstdlib>
#include <ctime>
#include <unordered_set>
namespace wowee {
namespace game {
@ -112,5 +113,20 @@ std::string ZoneManager::getRandomMusic(uint32_t zoneId) const {
return paths[std::rand() % paths.size()];
}
std::vector<std::string> ZoneManager::getAllMusicPaths() const {
std::vector<std::string> out;
std::unordered_set<std::string> seen;
for (const auto& [zoneId, zone] : zones) {
(void)zoneId;
for (const auto& path : zone.musicPaths) {
if (path.empty()) continue;
if (seen.insert(path).second) {
out.push_back(path);
}
}
}
return out;
}
} // namespace game
} // namespace wowee