Core/Battlegrounds: Rework queues
* No more copies of Battleground classes * FreesSlotQueues now have as key the MapId instead of queue id * Random queues can now popup already busy specific battelgrounds (queues are NOT merged) * Removed Holiday handling, this should already be handled in BattlegroundMgr::IsBGWeekend Port From (https://github.com/TrinityCore/TrinityCore/commit/0ede6c155605da602b3bafaa3a1212d9f924759b)
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class AlteracValley
|
||||
class BgAlteracValley : Battleground
|
||||
{
|
||||
public BgAlteracValley(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,10 +208,10 @@ namespace Game.BattleGrounds.Zones
|
||||
TriggerGameEvent(EventStartBattle);
|
||||
}
|
||||
|
||||
public override void AddPlayer(Player player)
|
||||
public override void AddPlayer(Player player, BattlegroundQueueTypeId queueId)
|
||||
{
|
||||
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||
base.AddPlayer(player);
|
||||
base.AddPlayer(player, queueId);
|
||||
if (!isInBattleground)
|
||||
PlayerScores[player.GetGUID()] = new BattlegroundABScore(player.GetGUID(), player.GetBGTeam());
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BattleforGilneas
|
||||
class BgBattleforGilneas : Battleground
|
||||
{
|
||||
public BgBattleforGilneas(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BgBladesEdgeArena : Battleground
|
||||
{
|
||||
public BgBladesEdgeArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BgDalaranSewers : Battleground
|
||||
{
|
||||
public BgDalaranSewers(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class DeepwindGorge
|
||||
class BgDeepwindGorge : Battleground
|
||||
{
|
||||
public BgDeepwindGorge(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2012-2016 CypherCore <http://github.com/CypherCore>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
using Game.Entities;
|
||||
using Framework.Constants;
|
||||
using System.Collections.Generic;
|
||||
using Game.Entities;
|
||||
using Game.Networking.Packets;
|
||||
using Game.DataStorage;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
@@ -367,10 +352,10 @@ namespace Game.BattleGrounds.Zones
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddPlayer(Player player)
|
||||
public override void AddPlayer(Player player, BattlegroundQueueTypeId queueId)
|
||||
{
|
||||
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||
base.AddPlayer(player);
|
||||
base.AddPlayer(player, queueId);
|
||||
if (!isInBattleground)
|
||||
PlayerScores[player.GetGUID()] = new BgEyeOfStormScore(player.GetGUID(), player.GetBGTeam());
|
||||
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class IsleofConquest
|
||||
class BgIsleofConquest : Battleground
|
||||
{
|
||||
public BgIsleofConquest(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
|
||||
public struct ICCreatures
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BgNagrandArena : Battleground
|
||||
{
|
||||
public BgNagrandArena(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BgRuinsOfLordaernon : Battleground
|
||||
{
|
||||
public BgRuinsOfLordaernon(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class SilvershardMines
|
||||
class BgSilvershardMines : Battleground
|
||||
{
|
||||
public BgSilvershardMines(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,10 +416,10 @@ namespace Game.BattleGrounds.Zones
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddPlayer(Player player)
|
||||
public override void AddPlayer(Player player, BattlegroundQueueTypeId queueId)
|
||||
{
|
||||
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||
base.AddPlayer(player);
|
||||
base.AddPlayer(player, queueId);
|
||||
if (!isInBattleground)
|
||||
PlayerScores[player.GetGUID()] = new BattlegroundSAScore(player.GetGUID(), player.GetBGTeam());
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class TempleofKotmogu
|
||||
class BgTempleofKotmogu : Battleground
|
||||
{
|
||||
public BgTempleofKotmogu(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
|
||||
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class BgTheRingOfValor : Battleground
|
||||
{
|
||||
public BgTheRingOfValor(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
namespace Game.BattleGrounds.Zones
|
||||
{
|
||||
class TwinPeaks
|
||||
class BgTwinPeaks : Battleground
|
||||
{
|
||||
public BgTwinPeaks(BattlegroundTemplate battlegroundTemplate) : base(battlegroundTemplate) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,10 +184,10 @@ namespace Game.BattleGrounds.Zones
|
||||
TriggerGameEvent(8563);
|
||||
}
|
||||
|
||||
public override void AddPlayer(Player player)
|
||||
public override void AddPlayer(Player player, BattlegroundQueueTypeId queueId)
|
||||
{
|
||||
bool isInBattleground = IsPlayerInBattleground(player.GetGUID());
|
||||
base.AddPlayer(player);
|
||||
base.AddPlayer(player, queueId);
|
||||
if (!isInBattleground)
|
||||
PlayerScores[player.GetGUID()] = new BattlegroundWGScore(player.GetGUID(), player.GetBGTeam());
|
||||
}
|
||||
@@ -320,7 +320,7 @@ namespace Game.BattleGrounds.Zones
|
||||
UpdateWorldState(WSGWorldStates.FlagStateHorde, 1);
|
||||
UpdateWorldState(WSGWorldStates.StateTimerActive, 0);
|
||||
|
||||
RewardHonorToTeam(Honor[(int)m_HonorMode][(int)WSGRewards.Win], winner);
|
||||
RewardHonorToTeam(Honor[Global.BattlegroundMgr.IsBGWeekend(BattlegroundTypeId.WS) ? 1 : 0][(int)WSGRewards.Win], winner);
|
||||
EndBattleground(winner);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user