mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
feat(Core/Grids): Implement visibility notifier (#15919)
* Cherry-picked from TrinityCore (unable to find author)
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
|
||||
MapMgr::MapMgr()
|
||||
{
|
||||
i_gridCleanUpDelay = sWorld->getIntConfig(CONFIG_INTERVAL_GRIDCLEAN);
|
||||
i_timer[3].SetInterval(sWorld->getIntConfig(CONFIG_INTERVAL_MAPUPDATE));
|
||||
mapUpdateStep = 0;
|
||||
_nextInstanceId = 0;
|
||||
@@ -53,6 +54,8 @@ MapMgr* MapMgr::instance()
|
||||
|
||||
void MapMgr::Initialize()
|
||||
{
|
||||
Map::InitStateMachine();
|
||||
|
||||
int num_threads(sWorld->getIntConfig(CONFIG_NUMTHREADS));
|
||||
|
||||
// Start mtmaps if needed
|
||||
@@ -81,10 +84,10 @@ Map* MapMgr::CreateBaseMap(uint32 id)
|
||||
ASSERT(entry);
|
||||
|
||||
if (entry->Instanceable())
|
||||
map = new MapInstanced(id);
|
||||
map = new MapInstanced(id, std::chrono::seconds(i_gridCleanUpDelay));
|
||||
else
|
||||
{
|
||||
map = new Map(id, 0, REGULAR_DIFFICULTY);
|
||||
map = new Map(id, std::chrono::seconds(i_gridCleanUpDelay), 0, REGULAR_DIFFICULTY);
|
||||
map->LoadRespawnTimes();
|
||||
map->LoadCorpseData();
|
||||
}
|
||||
@@ -333,6 +336,8 @@ void MapMgr::UnloadAll()
|
||||
|
||||
if (m_updater.activated())
|
||||
m_updater.deactivate();
|
||||
|
||||
Map::DeleteStateMachine();
|
||||
}
|
||||
|
||||
void MapMgr::GetNumInstances(uint32& dungeons, uint32& battlegrounds, uint32& arenas)
|
||||
|
||||
Reference in New Issue
Block a user