Core/Vmaps: Remove tile X/Y coord swapping
This commit is contained in:
@@ -115,7 +115,7 @@ namespace VMAP
|
||||
|
||||
std::string VMapManager::getTileFileName(uint32 mapID, uint32 tileX, uint32 tileY, std::string_view extension)
|
||||
{
|
||||
return Trinity::StringFormat("{:04}/{:04}_{:02}_{:02}.{}", mapID, mapID, tileY, tileX, extension);
|
||||
return Trinity::StringFormat("{:04}/{:04}_{:02}_{:02}.{}", mapID, mapID, tileX, tileY, extension);
|
||||
}
|
||||
|
||||
LoadResult VMapManager::loadMap(std::string const& basePath, uint32 mapId, uint32 x, uint32 y)
|
||||
|
||||
@@ -161,8 +161,8 @@ namespace MMAP
|
||||
|
||||
std::string fileName = fileItr->path().filename().string();
|
||||
|
||||
uint32 tileX = Trinity::StringTo<uint32>(std::string_view(fileName).substr(8, 2)).value_or(0);
|
||||
uint32 tileY = Trinity::StringTo<uint32>(std::string_view(fileName).substr(5, 2)).value_or(0);
|
||||
uint32 tileX = Trinity::StringTo<uint32>(std::string_view(fileName).substr(5, 2)).value_or(0);
|
||||
uint32 tileY = Trinity::StringTo<uint32>(std::string_view(fileName).substr(8, 2)).value_or(0);
|
||||
uint32 tileID = VMAP::StaticMapTree::packTileID(tileX, tileY);
|
||||
|
||||
if (tiles.insert(tileID).second)
|
||||
|
||||
@@ -242,8 +242,8 @@ namespace VMAP
|
||||
{
|
||||
uint32 x, y;
|
||||
StaticMapTree::unpackTileID(tileId, x, y);
|
||||
auto tileFile = OpenFile(mapDestDir / Trinity::StringFormat("{:04}_{:02}_{:02}.vmtile", data.MapId, y, x), "wb");
|
||||
auto tileSpawnIndicesFile = OpenFile(mapDestDir / Trinity::StringFormat("{:04}_{:02}_{:02}.vmtileidx", data.MapId, y, x), "wb");
|
||||
auto tileFile = OpenFile(mapDestDir / Trinity::StringFormat("{:04}_{:02}_{:02}.vmtile", data.MapId, x, y), "wb");
|
||||
auto tileSpawnIndicesFile = OpenFile(mapDestDir / Trinity::StringFormat("{:04}_{:02}_{:02}.vmtileidx", data.MapId, x, y), "wb");
|
||||
if (tileFile && tileSpawnIndicesFile)
|
||||
{
|
||||
std::set<uint32> const& parentTileEntries = data.ParentTileEntries[tileId];
|
||||
@@ -288,7 +288,7 @@ namespace VMAP
|
||||
|
||||
uint32 x, y;
|
||||
StaticMapTree::unpackTileID(tileId, x, y);
|
||||
auto tileSpawnIndicesFile = OpenFile(mapDestDir / Trinity::StringFormat("{:04}_{:02}_{:02}.vmtileidx", data.MapId, y, x), "wb");
|
||||
auto tileSpawnIndicesFile = OpenFile(mapDestDir / Trinity::StringFormat("{:04}_{:02}_{:02}.vmtileidx", data.MapId, x, y), "wb");
|
||||
if (tileSpawnIndicesFile)
|
||||
{
|
||||
uint32 nSpawns = spawns.size();
|
||||
|
||||
Reference in New Issue
Block a user