mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
- Add TurtlePacketParsers with dedicated movement block parser (Classic format + transport timestamp) - Fix quest giver status: read uint32 and translate vanilla enum values for Classic/Turtle - Fix quest accept packet: remove trailing uint32 that vanilla servers reject - Fix quest details parser: auto-detect vanilla vs WotLK format (informUnit field) - Fix spellbook and action bar icons: fallback to WotLK DBC field indices when expansion layout fails - Fix spell cast failure messages: translate vanilla SpellCastResult codes (+1 offset) - Fix realm list: correct type values (6=RP, 8=RP-PvP) and population thresholds - Fix music: disable looping for zone music, auto-advance to next random track when finished - Add music anti-repeat: avoid playing the same track back-to-back - Make TBC update block parsing resilient (keep parsed blocks on failure instead of aborting) - Add right-click attack on hostile mobs - Add name query diagnostic logging
34 lines
753 B
C++
34 lines
753 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <cstdint>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
namespace wowee {
|
|
namespace game {
|
|
|
|
struct ZoneInfo {
|
|
uint32_t id;
|
|
std::string name;
|
|
std::vector<std::string> musicPaths; // MPQ paths to music files
|
|
};
|
|
|
|
class ZoneManager {
|
|
public:
|
|
void initialize();
|
|
|
|
uint32_t getZoneId(int tileX, int tileY) const;
|
|
const ZoneInfo* getZoneInfo(uint32_t zoneId) const;
|
|
std::string getRandomMusic(uint32_t zoneId);
|
|
std::vector<std::string> getAllMusicPaths() const;
|
|
|
|
private:
|
|
// tile key = tileX * 100 + tileY
|
|
std::unordered_map<int, uint32_t> tileToZone;
|
|
std::unordered_map<uint32_t, ZoneInfo> zones;
|
|
std::string lastPlayedMusic_;
|
|
};
|
|
|
|
} // namespace game
|
|
} // namespace wowee
|