mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 22:37:06 +00:00
[7716] Fixed some typos and possible crashes.
This commit is contained in:
parent
c2e6dd20dd
commit
c9d51a6dc7
25 changed files with 281 additions and 263 deletions
|
|
@ -761,10 +761,10 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
|
|||
FillPlayersToBG(bg, queue_id);
|
||||
|
||||
// now everything is set, invite players
|
||||
for(GroupsQueueType::const_iterator itr = m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.begin(); itr != m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.end(); ++itr)
|
||||
InviteGroupToBG((*itr), bg, (*itr)->Team);
|
||||
for(GroupsQueueType::const_iterator itr = m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.begin(); itr != m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.end(); ++itr)
|
||||
InviteGroupToBG((*itr), bg, (*itr)->Team);
|
||||
for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE].SelectedGroups.end(); ++citr)
|
||||
InviteGroupToBG((*citr), bg, (*citr)->Team);
|
||||
for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_HORDE].SelectedGroups.end(); ++citr)
|
||||
InviteGroupToBG((*citr), bg, (*citr)->Team);
|
||||
|
||||
if (!bg->HasFreeSlots())
|
||||
{
|
||||
|
|
@ -834,8 +834,8 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
|
|||
}
|
||||
//invite those selection pools
|
||||
for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for(GroupsQueueType::const_iterator itr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); itr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++itr)
|
||||
InviteGroupToBG((*itr), bg2, (*itr)->Team);
|
||||
for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
|
||||
InviteGroupToBG((*citr), bg2, (*citr)->Team);
|
||||
//start bg
|
||||
bg2->StartBattleGround();
|
||||
//clear structures
|
||||
|
|
@ -861,8 +861,8 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BGQueueIdBasedOnLeve
|
|||
|
||||
// invite those selection pools
|
||||
for(uint32 i = 0; i < BG_TEAMS_COUNT; i++)
|
||||
for(GroupsQueueType::const_iterator itr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); itr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++itr)
|
||||
InviteGroupToBG((*itr), bg2, (*itr)->Team);
|
||||
for(GroupsQueueType::const_iterator citr = m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[BG_TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr)
|
||||
InviteGroupToBG((*citr), bg2, (*citr)->Team);
|
||||
// start bg
|
||||
bg2->StartBattleGround();
|
||||
}
|
||||
|
|
@ -1824,10 +1824,11 @@ void BattleGroundMgr::DistributeArenaPoints()
|
|||
|
||||
void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket *data, const uint64& guid, Player* plr, BattleGroundTypeId bgTypeId)
|
||||
{
|
||||
uint32 PlayerLevel = 10;
|
||||
if (!plr)
|
||||
return;
|
||||
|
||||
if (plr)
|
||||
PlayerLevel = plr->getLevel();
|
||||
uint32 PlayerLevel = 10;
|
||||
PlayerLevel = plr->getLevel();
|
||||
|
||||
data->Initialize(SMSG_BATTLEFIELD_LIST);
|
||||
*data << uint64(guid); // battlemaster guid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue