[8500] Fixed long existed bug with vmaps unloading.

When order of coordinates has been updated for loading case, unloading part
escape fixing in past.

Patch By Jolan

--HG--
branch : trunk
This commit is contained in:
Chaz Brown
2009-09-15 20:55:14 -04:00
parent 0174dd5aff
commit 1870644bf7

View File

@@ -1081,7 +1081,7 @@ bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool unloadAll)
delete GridMaps[gx][gy];
}
// x and y are swapped
VMAP::VMapFactory::createOrGetVMapManager()->unloadMap(GetId(), gy, gx);
VMAP::VMapFactory::createOrGetVMapManager()->unloadMap(GetId(), gx, gy);
}
else
((MapInstanced*)m_parentMap)->RemoveGridMapReference(GridPair(gx, gy));
@@ -1760,7 +1760,7 @@ uint16 Map::GetAreaFlag(float x, float y, float z) const
// The Violet Hold (Dalaran), fast check
if (x < 5791.0f && y > 404.0f && y < 595.0f)
{
{
areaflag = 2540;
break;
}
@@ -1788,14 +1788,14 @@ uint16 Map::GetAreaFlag(float x, float y, float z) const
// The Eventide (Dalaran), fast check against diagonal box with lower limit
if (z > 635.0f && x+y < 6375.0f && x+y > 6295.0f && x-y < 5106.0f && x-y > 4972.0f)
{
{
areaflag = 2543;
break;
}
// The Violet Hold (Dalaran), fast check
if (x < 5791.0f && y > 404.0f && y < 595.0f)
{
{
areaflag = 2540;
break;
}