mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectGridLoader.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "OutdoorPvPMgr.h"
|
||||
#include "Pet.h"
|
||||
#include "PhasingHandler.h"
|
||||
#include "PoolMgr.h"
|
||||
@@ -94,6 +95,8 @@ Map::~Map()
|
||||
if (!m_scriptSchedule.empty())
|
||||
sMapMgr->DecreaseScheduledScriptCount(m_scriptSchedule.size());
|
||||
|
||||
sOutdoorPvPMgr->DestroyOutdoorPvPForMap(this);
|
||||
|
||||
if (m_parentMap == this)
|
||||
delete m_childTerrainMaps;
|
||||
|
||||
@@ -375,6 +378,8 @@ i_scriptLock(false), _respawnCheckTimer(0)
|
||||
|
||||
_worldStateValues = sWorldStateMgr->GetInitialWorldStatesForMap(this);
|
||||
|
||||
sOutdoorPvPMgr->CreateOutdoorPvPForMap(this);
|
||||
|
||||
sScriptMgr->OnCreateMap(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user