Core/Mmaps:
* Unload instanced mmaps before unloading the base map * Load only mmaps for base map on map creation * Extractor: Somewhat speed improvement
This commit is contained in:
1 parent
dc95ce61b4
commit
5061fa626a
7 files changed
+105
-54
No files matched your search
@@ -71,8 +71,8 @@ Map::~Map()
|
||||
if (!m_scriptSchedule.empty())
|
||||
sScriptMgr->DecreaseScheduledScriptCount(m_scriptSchedule.size());
|
||||
|
||||
MMAP::MMapFactory::createOrGetMMapManager()->unloadMap(GetId());
|
||||
MMAP::MMapFactory::createOrGetMMapManager()->unloadMapInstance(GetId(), i_InstanceId);
|
||||
MMAP::MMapFactory::createOrGetMMapManager()->unloadMap(GetId());
|
||||
}
|
||||
|
||||
bool Map::ExistMap(uint32 mapid, int gx, int gy)
|
||||
@@ -206,9 +206,12 @@ void Map::LoadMap(int gx, int gy, bool reload)
|
||||
void Map::LoadMapAndVMap(int gx, int gy)
|
||||
{
|
||||
LoadMap(gx, gy);
|
||||
LoadMMap(gx, gy);
|
||||
// Only load the data for the base map
|
||||
if (i_InstanceId == 0)
|
||||
LoadVMap(gx, gy); // Only load the data for the base map
|
||||
{
|
||||
LoadVMap(gx, gy);
|
||||
LoadMMap(gx, gy);
|
||||
}
|
||||
}
|
||||
|
||||
void Map::InitStateMachine()
|
||||
|
||||
Reference in new issue
Block a user