mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 16:39:08 +01:00
Core/Scripts: Removed script calls from constructors and destructors
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user