mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[7401] Fixed bgqueue invitation to already started battlegrounds - not tested.
Finally fixed sql update in [7399]. Thx to Lake292. Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
f64341068b
commit
898fef99d2
4 changed files with 13 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7400"
|
||||
#define REVISION_NR "7401"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue