mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 10:03:51 +00:00
feat: client detects WOB buildings and JSON DBCs from custom zones
- TerrainManager now checks for .wob files before loading WMO buildings (searches custom_zones/buildings/ and output/MapName/buildings/) - AssetManager::loadDBC() scans custom_zones/*/data/ for JSON DBC overrides exported by the editor - WOB detection logs when found (full WOB→WMOModel conversion pending) - JSON DBC detection logs when found (full JSON→DBCFile loading pending) Client open format support status: - WOT/WHM terrain: FULL (loads and renders) - PNG textures: FULL (override system) - WOM models: FULL (loads and renders) - zone.json: DETECTION (CustomZoneDiscovery scans) - WOB buildings: DETECTION (found, conversion pending) - JSON DBC: DETECTION (found, loading pending)
This commit is contained in:
parent
71b06826b1
commit
2d417aa125
2 changed files with 38 additions and 0 deletions
|
|
@ -311,6 +311,27 @@ std::shared_ptr<DBCFile> AssetManager::loadDBC(const std::string& name) {
|
|||
}
|
||||
}
|
||||
|
||||
// Check for JSON DBC from custom zones (wowee open format)
|
||||
// JSON DBCs exported by the editor contain the same record data
|
||||
// but the DBCFile::load() only handles binary — so JSON overrides
|
||||
// are logged for now and will need a JSON→DBC converter in future.
|
||||
if (dbcData.empty()) {
|
||||
std::string baseName = name;
|
||||
auto dot = baseName.rfind('.');
|
||||
if (dot != std::string::npos) baseName = baseName.substr(0, dot);
|
||||
for (const std::string& dir : {"custom_zones", "output"}) {
|
||||
if (!std::filesystem::exists(dir)) continue;
|
||||
for (auto& entry : std::filesystem::directory_iterator(dir)) {
|
||||
if (!entry.is_directory()) continue;
|
||||
std::string jsonPath = entry.path().string() + "/data/" + baseName + ".json";
|
||||
if (std::filesystem::exists(jsonPath)) {
|
||||
LOG_DEBUG("JSON DBC available (not yet loaded): ", jsonPath);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fall back to expansion-specific CSV (e.g. Data/expansions/wotlk/db/Spell.csv)
|
||||
if (dbcData.empty() && !expansionDataPath_.empty()) {
|
||||
std::string baseName = name;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue