diff options
author | Shauren <shauren.trinity@gmail.com> | 2024-03-14 20:32:03 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2024-03-14 20:32:03 +0100 |
commit | 783f9c0ea38da35c328affa27ac4cf6b7bfd8bd8 (patch) | |
tree | 23947e9b265d4e7f20f757f21740dd10bac59f5b /src/server/game/Maps/Map.cpp | |
parent | 6224036efd9e6173f4650d7b7c0a31319a3dad7a (diff) |
Core/Scripts: Removed script calls from constructors and destructors
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r-- | src/server/game/Maps/Map.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 19c9fff765c..b603d704f97 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -16,14 +16,13 @@ */ #include "Map.h" -#include "BattlefieldMgr.h" #include "Battleground.h" #include "CellImpl.h" #include "CharacterPackets.h" #include "Containers.h" #include "Conversation.h" -#include "DatabaseEnv.h" #include "DB2Stores.h" +#include "DatabaseEnv.h" #include "DynamicTree.h" #include "GameObjectModel.h" #include "GameTime.h" @@ -43,7 +42,6 @@ #include "ObjectAccessor.h" #include "ObjectGridLoader.h" #include "ObjectMgr.h" -#include "OutdoorPvPMgr.h" #include "Pet.h" #include "PhasingHandler.h" #include "PoolMgr.h" @@ -51,9 +49,9 @@ #include "SpellAuras.h" #include "TerrainMgr.h" #include "Transport.h" -#include "Vehicle.h" #include "VMapFactory.h" #include "VMapManager2.h" +#include "Vehicle.h" #include "Vignette.h" #include "VignettePackets.h" #include "Weather.h" @@ -90,10 +88,6 @@ struct RespawnInfoWithHandle : RespawnInfo Map::~Map() { - // UnloadAll must be called before deleting the map - - sScriptMgr->OnDestroyMap(this); - // Delete all waiting spawns, else there will be a memory leak // This doesn't delete from database. UnloadAllRespawnInfos(); @@ -110,9 +104,6 @@ Map::~Map() if (!m_scriptSchedule.empty()) sMapMgr->DecreaseScheduledScriptCount(m_scriptSchedule.size()); - sOutdoorPvPMgr->DestroyOutdoorPvPForMap(this); - sBattlefieldMgr->DestroyBattlefieldsForMap(this); - m_terrain->UnloadMMapInstance(GetId(), GetInstanceId()); } @@ -173,11 +164,6 @@ i_scriptLock(false), _respawnTimes(std::make_unique<RespawnListContainer>()), _r m_terrain->LoadMMapInstance(GetId(), GetInstanceId()); _worldStateValues = sWorldStateMgr->GetInitialWorldStatesForMap(this); - - sOutdoorPvPMgr->CreateOutdoorPvPForMap(this); - sBattlefieldMgr->CreateBattlefieldsForMap(this); - - sScriptMgr->OnCreateMap(this); } void Map::InitVisibilityDistance() |