aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhaster <theghaster1@gmail.com>2020-05-17 01:35:40 +0200
committerGitHub <noreply@github.com>2020-05-17 01:35:40 +0200
commit00c4be9f599d54185e9b5601dc602a62014b1362 (patch)
tree7342029cc572565a04ae5c966b1c41decf94e4c6
parent7038c74f438ba9e9a04984083d46563bc2903432 (diff)
Tools/vmap_extractor: Fixed a typo reading MAIN/MAID chunks (#24637)
-rw-r--r--src/tools/vmap4_extractor/wdtfile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/vmap4_extractor/wdtfile.cpp b/src/tools/vmap4_extractor/wdtfile.cpp
index 331bb2c7e5d..f5374d3dd37 100644
--- a/src/tools/vmap4_extractor/wdtfile.cpp
+++ b/src/tools/vmap4_extractor/wdtfile.cpp
@@ -156,13 +156,13 @@ ADTFile* WDTFile::GetMap(int32 x, int32 y)
if (_adtCache && _adtCache->file[x][y])
return _adtCache->file[x][y].get();
- if (!(_adtInfo.Data[x][y].Flag & 1))
+ if (!(_adtInfo.Data[y][x].Flag & 1))
return nullptr;
ADTFile* adt;
std::string name = Trinity::StringFormat("World\\Maps\\%s\\%s_%d_%d_obj0.adt", _mapName.c_str(), _mapName.c_str(), x, y);
if (_header.Flags & 0x200)
- adt = new ADTFile(_adtFileDataIds->Data[x][y].Obj0ADT, name, _adtCache != nullptr);
+ adt = new ADTFile(_adtFileDataIds->Data[y][x].Obj0ADT, name, _adtCache != nullptr);
else
adt = new ADTFile(name, _adtCache != nullptr);