Core/Battlefields: Refactor Battlefield creation to be linked to host map creation instead of having globally accessible objects
Port From (https://github.com/TrinityCore/TrinityCore/commit/073a036d84365dae60a70064eb67e68f0447bd72)
This commit is contained in:
@@ -90,6 +90,7 @@ namespace Game.Maps
|
||||
_worldStateValues = Global.WorldStateMgr.GetInitialWorldStatesForMap(this);
|
||||
|
||||
Global.OutdoorPvPMgr.CreateOutdoorPvPForMap(this);
|
||||
Global.BattleFieldMgr.CreateBattlefieldsForMap(this);
|
||||
|
||||
Global.ScriptMgr.OnCreateMap(this);
|
||||
}
|
||||
@@ -114,6 +115,7 @@ namespace Game.Maps
|
||||
Global.MapMgr.DecreaseScheduledScriptCount((uint)m_scriptSchedule.Count);
|
||||
|
||||
Global.OutdoorPvPMgr.DestroyOutdoorPvPForMap(this);
|
||||
Global.BattleFieldMgr.DestroyBattlefieldsForMap(this);
|
||||
|
||||
if (m_parentMap == this)
|
||||
m_childTerrainMaps = null;
|
||||
|
||||
Reference in New Issue
Block a user