mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
Revert Visibility Notifier changes (#17682)
* Revert "fix(Core/Grid): Implement missing GridUnload setting (#17569)" This reverts commit79b39f9655. * Revert "fix(Core/Grid): Address bugs and performance issues introduced by visibility notifier implementation (#17480)" This reverts commit60e27511c5. * Revert "fix(Core): GridCleanUpDelay Log (#17436)" This reverts commit90b16ca065. * Revert "feat(Core/Grids): Implement visibility notifier (#15919)" This reverts commit2779833768.
This commit is contained in:
@@ -25,12 +25,11 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "VMapMgr2.h"
|
||||
|
||||
MapInstanced::MapInstanced(uint32 id, time_t expiry) : Map(id, expiry, 0, DUNGEON_DIFFICULTY_NORMAL)
|
||||
MapInstanced::MapInstanced(uint32 id) : Map(id, 0, DUNGEON_DIFFICULTY_NORMAL)
|
||||
{
|
||||
// fill with zero
|
||||
memset(&GridMapReference, 0, MAX_NUMBER_OF_GRIDS * MAX_NUMBER_OF_GRIDS * sizeof(uint16));
|
||||
// initialize instanced maps list
|
||||
m_InstancedMaps.clear();
|
||||
}
|
||||
|
||||
void MapInstanced::InitVisibilityDistance()
|
||||
@@ -204,7 +203,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave* save,
|
||||
|
||||
LOG_DEBUG("maps", "MapInstanced::CreateInstance: {} map instance {} for {} created with difficulty {}", save ? "" : "new ", InstanceId, GetId(), difficulty ? "heroic" : "normal");
|
||||
|
||||
InstanceMap* map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this);
|
||||
InstanceMap* map = new InstanceMap(GetId(), InstanceId, difficulty, this);
|
||||
ASSERT(map->IsDungeon());
|
||||
|
||||
map->LoadRespawnTimes();
|
||||
@@ -238,7 +237,7 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun
|
||||
else
|
||||
spawnMode = REGULAR_DIFFICULTY;
|
||||
|
||||
BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode);
|
||||
BattlegroundMap* map = new BattlegroundMap(GetId(), InstanceId, this, spawnMode);
|
||||
ASSERT(map->IsBattlegroundOrArena());
|
||||
map->SetBG(bg);
|
||||
bg->SetBgMap(map);
|
||||
@@ -261,15 +260,6 @@ bool MapInstanced::DestroyInstance(InstancedMaps::iterator& itr)
|
||||
sScriptMgr->OnDestroyInstance(this, itr->second);
|
||||
|
||||
itr->second->UnloadAll();
|
||||
// should only unload VMaps if this is the last instance
|
||||
if (m_InstancedMaps.size() <= 1)
|
||||
{
|
||||
VMAP::VMapFactory::createOrGetVMapMgr()->unloadMap(itr->second->GetId());
|
||||
MMAP::MMapFactory::createOrGetMMapMgr()->unloadMap(itr->second->GetId());
|
||||
// in that case, unload grids of the base map, too
|
||||
// so in the next map creation, (EnsureGridCreated actually) VMaps will be reloaded
|
||||
Map::UnloadAll();
|
||||
}
|
||||
|
||||
// erase map
|
||||
delete itr->second;
|
||||
|
||||
Reference in New Issue
Block a user