mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Fix NPC visibility and stabilize world transport/taxi updates
This commit is contained in:
parent
5dae994830
commit
f752a4f517
16 changed files with 452 additions and 173 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue