diff options
| author | Shauren <shauren.trinity@gmail.com> | 2024-03-14 20:32:03 +0100 |
|---|---|---|
| committer | funjoker <funjoker109@gmail.com> | 2024-03-25 20:22:48 +0100 |
| commit | 67577f804314c8876d5509e067e62fb9800eea86 (patch) | |
| tree | eda2f9a114f10365dde5a89c5d1d978bfd64edbd /src/server/game/Maps/Map.cpp | |
| parent | 11f77687734ed6b0c5496e1abd9a97743b30079f (diff) | |
Core/Scripts: Removed script calls from constructors and destructors
(cherry picked from commit 783f9c0ea38da35c328affa27ac4cf6b7bfd8bd8)
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() |
