aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/BattleGroundHandler.cpp
diff options
context:
space:
mode:
authorGooyeth <migmadmu@hotmail.com>2018-04-15 08:57:57 -0600
committerAokromes <Aokromes@users.noreply.github.com>2018-04-15 16:57:57 +0200
commit8aad6f828e7ade2232da3d4697c41b12f3acc727 (patch)
tree3a2d42276277cd63ab6ada6873ca3d1e7b15a27e /src/server/game/Handlers/BattleGroundHandler.cpp
parentf3833b426d958c275f68d00574cce73ad68d74d8 (diff)
Core/Battleground: allow Random battleground and arena queues same time. (#21730)
- It also restricts queuing to arenas if it is in queue of dungeon finder
Diffstat (limited to 'src/server/game/Handlers/BattleGroundHandler.cpp')
-rw-r--r--src/server/game/Handlers/BattleGroundHandler.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index 4207527ddb0..6707931b603 100644
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -158,7 +158,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
return;
}
- if (_player->InBattlegroundQueue() && bgTypeId == BATTLEGROUND_RB)
+ if (_player->InBattlegroundQueue(true) && bgTypeId == BATTLEGROUND_RB)
{
// player is already in queue, can't start random queue
WorldPacket data;
@@ -668,6 +668,15 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
if (!asGroup)
{
+ if (_player->isUsingLfg())
+ {
+ // player is using dungeon finder or raid finder
+ WorldPacket data;
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_LFG_CANT_USE_BATTLEGROUND);
+ _player->SendDirectMessage(&data);
+ return;
+ }
+
// check if already in queue
if (_player->GetBattlegroundQueueIndex(bgQueueTypeId) < PLAYER_MAX_BATTLEGROUND_QUEUES)
//player is already in this queue