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:
@@ -36,7 +36,7 @@ namespace Game.BattleFields
|
||||
|
||||
public class BattleField : ZoneScript
|
||||
{
|
||||
public BattleField()
|
||||
public BattleField(Map map)
|
||||
{
|
||||
m_IsEnabled = true;
|
||||
m_DefenderTeam = TeamId.Neutral;
|
||||
@@ -47,6 +47,9 @@ namespace Game.BattleFields
|
||||
|
||||
m_LastResurectTimer = 30 * Time.InMilliseconds;
|
||||
|
||||
m_Map = map;
|
||||
m_MapId = map.GetId();
|
||||
|
||||
for (byte i = 0; i < 2; ++i)
|
||||
{
|
||||
m_players[i] = new List<ObjectGuid>();
|
||||
|
||||
Reference in New Issue
Block a user