Core/Battleground: Do not allow to join queue if anyone in the party is using dungeon system

--HG--
branch : trunk
This commit is contained in:
Spp
2010-11-24 15:37:22 +01:00
parent 90bf2d93ba
commit ce989d701a
2 changed files with 16 additions and 9 deletions
@@ -99,15 +99,6 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
sLog.outDebug("WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
// player is using dungeon finder or raid finder
if (GetPlayer()->isUsingLfg())
{
WorldPacket data;
sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_LFG_CANT_USE_BATTLEGROUND);
GetPlayer()->GetSession()->SendPacket(&data);
return;
}
// can do this, since it's battleground, not arena
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, 0);
BattlegroundQueueTypeId bgQueueTypeIdRandom = BattlegroundMgr::BGQueueTypeId(BATTLEGROUND_RB, 0);
@@ -136,6 +127,15 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
// check queue conditions
if (!joinAsGroup)
{
if (GetPlayer()->isUsingLfg())
{
// player is using dungeon finder or raid finder
WorldPacket data;
sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_LFG_CANT_USE_BATTLEGROUND);
GetPlayer()->GetSession()->SendPacket(&data);
return;
}
// check Deserter debuff
if (!_player->CanJoinToBattleground())
{