Remove LOTS of compile warnings
--HG-- branch : trunk
This commit is contained in:
@@ -77,7 +77,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
uint32 instanceId;
|
||||
uint8 joinAsGroup;
|
||||
bool isPremade = false;
|
||||
Group * grp;
|
||||
Group * grp = NULL;
|
||||
|
||||
recv_data >> guid; // battlemaster guid
|
||||
recv_data >> bgTypeId_; // battleground type id (DBC id)
|
||||
@@ -134,6 +134,18 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
// check if has free queue slots
|
||||
if (!_player->HasFreeBattleGroundQueueId())
|
||||
return;
|
||||
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
|
||||
GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, 0, false, isPremade, 0);
|
||||
uint32 avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
|
||||
// already checked if queueSlot is valid, now just get it
|
||||
uint32 queueSlot = _player->AddBattleGroundQueueId(bgQueueTypeId);
|
||||
|
||||
WorldPacket data;
|
||||
// send status packet (in queue)
|
||||
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
|
||||
SendPacket(&data);
|
||||
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -145,13 +157,8 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
err = grp->CanJoinBattleGroundQueue(bg, bgQueueTypeId, 0, bg->GetMaxPlayersPerTeam(), false, 0);
|
||||
isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam());
|
||||
}
|
||||
// if we're here, then the conditions to join a bg are met. We can proceed in joining.
|
||||
|
||||
// _player->GetGroup() was already checked, grp is already initialized
|
||||
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
if (joinAsGroup /* && _player->GetGroup()*/)
|
||||
{
|
||||
BattleGroundQueue& bgQueue = sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId];
|
||||
GroupQueueInfo * ginfo;
|
||||
uint32 avgTime;
|
||||
|
||||
@@ -187,19 +194,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
|
||||
}
|
||||
sLog.outDebug("Battleground: group end");
|
||||
}
|
||||
else
|
||||
{
|
||||
GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, 0, false, isPremade, 0);
|
||||
uint32 avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
|
||||
// already checked if queueSlot is valid, now just get it
|
||||
uint32 queueSlot = _player->AddBattleGroundQueueId(bgQueueTypeId);
|
||||
|
||||
WorldPacket data;
|
||||
// send status packet (in queue)
|
||||
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
|
||||
SendPacket(&data);
|
||||
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
|
||||
}
|
||||
sBattleGroundMgr.ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user