diff options
| author | Spp <none@none> | 2010-09-26 13:59:51 +0200 |
|---|---|---|
| committer | Spp <none@none> | 2010-09-26 13:59:51 +0200 |
| commit | ef16cc91094f524555f36f8b27480b7543dc267c (patch) | |
| tree | 692645b7d0aec3f8758a592c43a5271c6c4f2115 /src/server/game/Server | |
| parent | 07fc33a083f84c758002ef1187335416ce695a99 (diff) | |
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
Diffstat (limited to 'src/server/game/Server')
| -rw-r--r-- | src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp index b1bc9a89f49..60cd965a36b 100644 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp @@ -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); |
