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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user