From 31e71cef1b5ca91c739009df45221d322ecb65ec Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 27 Feb 2009 12:56:48 -0600 Subject: [7352] Fixed conditions in FillPlayersToBG to correctly kick group only when other team's selection pool is empty. Problem reported by balrok. Author: Triply --HG-- branch : trunk --- src/game/BattleGroundMgr.cpp | 4 ++++ src/game/Player.cpp | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index f2ebee8538f..7b557e5f5c8 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -497,9 +497,11 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BGQueueIdBasedOnLevel } //if ali selection is already empty, then kick horde group, but if there are less horde than ali in bg - break; if( !m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() ) + { if( aliFree <= diffHorde - 1 ) break; m_SelectionPools[BG_TEAM_HORDE].KickGroup(diffHorde - diffAli); + } } else { @@ -510,9 +512,11 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BGQueueIdBasedOnLevel ++Horde_itr; } if( !m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() ) + { if( hordeFree <= diffAli - 1 ) break; m_SelectionPools[BG_TEAM_ALLIANCE].KickGroup(diffAli - diffHorde); + } } //count diffs after small update diffAli = aliFree - m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount(); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 2f1c4aeeb75..eba15e63e40 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -19079,7 +19079,7 @@ BGQueueIdBasedOnLevel Player::GetBattleGroundQueueIdFromLevel(BattleGroundTypeId { //returned to hardcoded version of this function, because there is no way to code it dynamic uint32 level = getLevel(); - if( bgTypeId == BATTLEGROUND_QUEUE_AV ) + if( bgTypeId == BATTLEGROUND_AV ) level--; uint32 queue_id = (level / 10) - 1; // for ranges 0 - 19, 20 - 29, 30 - 39, 40 - 49, 50 - 59, 60 - 69, 70 -79, 80 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 31229f6295e..8e9b6a0b264 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 "7351" + #define REVISION_NR "7352" #endif // __REVISION_NR_H__ -- cgit v1.2.3