diff --git a/sql/updates/7399_01_mangos_mangos_string.sql b/sql/updates/7399_01_mangos_mangos_string.sql index d05a8e853..d029d28d3 100644 --- a/sql/updates/7399_01_mangos_mangos_string.sql +++ b/sql/updates/7399_01_mangos_mangos_string.sql @@ -1,3 +1,6 @@ +ALTER TABLE db_version CHANGE COLUMN required_7393_01_mangos_game_event required_7399_01_mangos_mangos_string bit; + +DELETE FROM mangos_string WHERE entry in (753, 754, 755); INSERT INTO mangos_string VALUES (753,'The battle for Warsong Gulch begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); INSERT INTO mangos_string VALUES (754,'The battle for Arathi Basin begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); INSERT INTO mangos_string VALUES (755,'The battle for Eye of the Storm begins in 2 minutes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL); diff --git a/sql/updates/Makefile.am b/sql/updates/Makefile.am index 9857066c0..ea455f781 100644 --- a/sql/updates/Makefile.am +++ b/sql/updates/Makefile.am @@ -194,6 +194,7 @@ pkgdata_DATA = \ 7388_01_mangos_mangos_string.sql \ 7390_01_mangos_areatrigger_teleport.sql \ 7393_01_mangos_game_event.sql \ + 7399_01_mangos_mangos_string.sql \ README ## Additional files to include when running 'make dist' diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index a07ba6c62..e4c482a03 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -81,7 +81,7 @@ void BattleGroundQueue::SelectionPool::Init() // remove group info from selection pool // returns true when we need to try to add new group to selection pool -// or false when pool is ok +// returns false when selection pool is ok or when we kicked smaller group than we need to kick // sometimes it can be called on empty selection pool bool BattleGroundQueue::SelectionPool::KickGroup(uint32 size) { @@ -105,7 +105,8 @@ bool BattleGroundQueue::SelectionPool::KickGroup(uint32 size) GroupQueueInfo* ginfo = (*groupToKick); SelectedGroups.erase(groupToKick); PlayerCount -= ginfo->Players.size(); - if (abs((int32)(ginfo->Players.size() - size)) <= 1) + //return false if we kicked smaller group or there are enough players in selection pool + if (ginfo->Players.size() <= size + 1) return false; } return true; @@ -113,8 +114,8 @@ bool BattleGroundQueue::SelectionPool::KickGroup(uint32 size) // add group to selection pool // used when building selection pools -// returns true if we can invite more players -// returns false when selection pool is set +// returns true if we can invite more players, or when we added group to selection pool +// returns false when selection pool is full bool BattleGroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 desiredCount) { //if group is larger than desired count - don't allow to add it to pool @@ -123,6 +124,7 @@ bool BattleGroundQueue::SelectionPool::AddGroup(GroupQueueInfo *ginfo, uint32 de SelectedGroups.push_back(ginfo); // increase selected players count PlayerCount += ginfo->Players.size(); + return true; } if( PlayerCount < desiredCount ) return true; @@ -499,7 +501,7 @@ 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 ) + if( aliFree <= diffHorde + 1 ) break; m_SelectionPools[BG_TEAM_HORDE].KickGroup(diffHorde - diffAli); } @@ -514,7 +516,7 @@ void BattleGroundQueue::FillPlayersToBG(BattleGround* bg, BGQueueIdBasedOnLevel } if( !m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() ) { - if( hordeFree <= diffAli - 1 ) + if( hordeFree <= diffAli + 1 ) break; m_SelectionPools[BG_TEAM_ALLIANCE].KickGroup(diffAli - diffHorde); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index eb04afb51..0cbbe03d1 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 "7400" + #define REVISION_NR "7401" #endif // __REVISION_NR_H__