Core/Battlegrounds: Use fields from DB2/battleground_template data in the Battleground Class

Port From (https://github.com/TrinityCore/TrinityCore/commit/d7623adf0e6b8c5cdc1e468b89172ed7db63fe92)
This commit is contained in:
hondacrx
2020-05-20 14:58:21 -04:00
parent 96fffc67d6
commit 2acce62671
15 changed files with 245 additions and 220 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ namespace Game.Arenas
{
public class Arena : Battleground
{
public Arena()
public Arena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate)
{
StartDelayTimes[BattlegroundConst.EventIdFirst] = BattlegroundStartTimeIntervals.Delay1m;
StartDelayTimes[BattlegroundConst.EventIdSecond] = BattlegroundStartTimeIntervals.Delay30s;
@@ -18,11 +18,14 @@
using Framework.Constants;
using Game.Entities;
using Game.Network.Packets;
using Game.BattleGrounds;
namespace Game.Arenas
{
public class BladesEdgeArena : Arena
{
public BladesEdgeArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
public override void StartingEventCloseDoors()
{
for (int i = BladeEdgeObjectTypes.Door1; i <= BladeEdgeObjectTypes.Door4; ++i)
+2 -1
View File
@@ -19,12 +19,13 @@ using Framework.Constants;
using Framework.Dynamic;
using Game.Entities;
using Game.Network.Packets;
using Game.BattleGrounds;
namespace Game.Arenas
{
class DalaranSewersArena : Arena
{
public DalaranSewersArena()
public DalaranSewersArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate)
{
_events = new EventMap();
}
+3
View File
@@ -18,11 +18,14 @@
using Framework.Constants;
using Game.Entities;
using Game.Network.Packets;
using Game.BattleGrounds;
namespace Game.Arenas
{
public class NagrandArena : Arena
{
public NagrandArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
public override void StartingEventCloseDoors()
{
for (int i = NagrandArenaObjectTypes.Door1; i <= NagrandArenaObjectTypes.Door4; ++i)
+2 -1
View File
@@ -19,12 +19,13 @@ using Framework.Constants;
using Framework.Dynamic;
using Game.Entities;
using Game.Network.Packets;
using Game.BattleGrounds;
namespace Game.Arenas
{
class RingofValorArena : Arena
{
public RingofValorArena()
public RingofValorArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate)
{
_events = new EventMap();
}
@@ -18,11 +18,14 @@
using Framework.Constants;
using Game.Entities;
using Game.Network.Packets;
using Game.BattleGrounds;
namespace Game.Arenas
{
class RuinsofLordaeronArena : Arena
{
public RuinsofLordaeronArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
public override bool SetupBattleground()
{
bool result = true;