Core/OutdoorPvP: Refactor OutdoorPvP creation to be linked to host map creation instead of having globally accessible objects
Port From (https://github.com/TrinityCore/TrinityCore/commit/775be0682a794d0a1f62d656f8c6c6dffca8de79)
This commit is contained in:
@@ -89,6 +89,8 @@ namespace Game.Maps
|
||||
|
||||
_worldStateValues = Global.WorldStateMgr.GetInitialWorldStatesForMap(this);
|
||||
|
||||
Global.OutdoorPvPMgr.CreateOutdoorPvPForMap(this);
|
||||
|
||||
Global.ScriptMgr.OnCreateMap(this);
|
||||
}
|
||||
|
||||
@@ -111,6 +113,8 @@ namespace Game.Maps
|
||||
if (!m_scriptSchedule.Empty())
|
||||
Global.MapMgr.DecreaseScheduledScriptCount((uint)m_scriptSchedule.Count);
|
||||
|
||||
Global.OutdoorPvPMgr.DestroyOutdoorPvPForMap(this);
|
||||
|
||||
if (m_parentMap == this)
|
||||
m_childTerrainMaps = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user