From 811a86baf55e1be8c5bba49cec840db81f298bdb Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Mon, 18 Oct 2010 09:04:21 +0400 Subject: [PATCH] [10619] Clarify premade groups mode config option. Also prevent mark group as premade with 0 time wait. It's any way useless becase at next tick group moved to normal team mode. --- src/game/BattleGroundHandler.cpp | 4 +++- src/game/BattleGroundMgr.cpp | 6 ++++-- src/mangosd/mangosd.conf.dist.in | 2 +- src/shared/revision_nr.h | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp index 8278b15cf..4894b8b6e 100644 --- a/src/game/BattleGroundHandler.cpp +++ b/src/game/BattleGroundHandler.cpp @@ -31,6 +31,7 @@ #include "ArenaTeam.h" #include "Language.h" #include "ScriptCalls.h" +#include "World.h" void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data) { @@ -150,7 +151,8 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data ) if (grp->GetLeaderGuid() != _player->GetObjectGuid()) return; err = grp->CanJoinBattleGroundQueue(bg, bgQueueTypeId, 0, bg->GetMaxPlayersPerTeam(), false, 0); - isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam()); + isPremade = sWorld.getConfig(CONFIG_UINT32_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH) && + (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam()); } // if we're here, then the conditions to join a bg are met. We can proceed in joining. diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index d2c5e86ac..f0bef722c 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -170,9 +170,11 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG //compute index (if group is premade or joined a rated match) to queues uint32 index = 0; if (!isRated && !isPremade) - index += BG_TEAMS_COUNT; + index += BG_TEAMS_COUNT; // BG_QUEUE_PREMADE_* -> BG_QUEUE_NORMAL_* + if (ginfo->Team == HORDE) - index++; + index++; // BG_QUEUE_*_ALLIANCE -> BG_QUEUE_*_HORDE + DEBUG_LOG("Adding Group to BattleGroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index); uint32 lastOnlineTime = getMSTime(); diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 9a4778a55..b7bd28a05 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1357,7 +1357,7 @@ Death.Bones.BattlegroundOrArena = 1 # BattleGround.PremadeGroupWaitForMatch # The time in which premade group of 1 faction waits in BG Queue for premade group of other faction # Default: 1800000 (30 minutes) -# 0 - disable (not recommended) +# 0 - disable premade group matches (group always added to bg team in normal way) # ################################################################################################################### diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7e644d781..7f641875d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10618" + #define REVISION_NR "10619" #endif // __REVISION_NR_H__