diff options
| -rwxr-xr-x | src/server/game/Groups/Group.cpp | 7 | ||||
| -rwxr-xr-x | src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp | 18 |
2 files changed, 16 insertions, 9 deletions
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index 9d9ab269b3f..1049ce06f7c 100755 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1591,6 +1591,10 @@ void Group::UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed) GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 /*MaxPlayerCount*/, bool isRated, uint32 arenaSlot) { + // check if this group is LFG group + if (isLFGGroup()) + return ERR_LFG_CANT_USE_BATTLEGROUND; + BattlemasterListEntry const* bgEntry = sBattlemasterListStore.LookupEntry(bgOrTemplate->GetTypeID()); if (!bgEntry) return ERR_GROUP_JOIN_BATTLEGROUND_FAIL; // shouldn't happen @@ -1649,6 +1653,9 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const* // check if member can join any more battleground queues if (!member->HasFreeBattlegroundQueueId()) return ERR_BATTLEGROUND_TOO_MANY_QUEUES; // not blizz-like + // check if someone in party is using dungeon system + if (member->isUsingLfg()) + return ERR_LFG_CANT_USE_BATTLEGROUND; } // only check for MinPlayerCount since MinPlayerCount == MaxPlayerCount for arenas... diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp index 15c30214880..fe98f6a0481 100755 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp @@ -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()) { |
