Core/Dungeon Finder: Add lfg state to know if a player is using lfg or lfr

- Do not allow to join battleground if using lfg/lfr

Closes issue 4189

--HG--
branch : trunk
This commit is contained in:
Spp
2010-09-26 13:59:51 +02:00
parent 07fc33a083
commit ef16cc9109
4 changed files with 37 additions and 3 deletions
@@ -101,6 +101,15 @@ 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);