mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Fix warnings
This commit is contained in:
@@ -737,8 +737,6 @@ void Battleground::EndBattleground(uint32 winner)
|
||||
BuildPvPLogDataPacket(*pvpMatchEnd.LogData);
|
||||
pvpMatchEnd.Write();
|
||||
|
||||
BattlegroundQueueTypeId bgQueueTypeId = GetQueueId();
|
||||
|
||||
for (BattlegroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
{
|
||||
uint32 team = itr->second.Team;
|
||||
@@ -1045,10 +1043,6 @@ void Battleground::AddPlayer(Player* player)
|
||||
playerJoined.Guid = player->GetGUID();
|
||||
SendPacketToTeam(team, playerJoined.Write(), player);
|
||||
|
||||
// BG Status packet
|
||||
BattlegroundQueueTypeId bgQueueTypeId = GetQueueId();
|
||||
uint32 queueSlot = player->GetBattlegroundQueueIndex(bgQueueTypeId);
|
||||
|
||||
WorldPackets::Battleground::PVPMatchInit pvpMatchState;
|
||||
pvpMatchState.MapID = GetMapId();
|
||||
switch (GetStatus())
|
||||
@@ -1787,8 +1781,6 @@ void Battleground::PlayerAddedToBGCheckIfBGIsRunning(Player* player)
|
||||
if (GetStatus() != STATUS_WAIT_LEAVE)
|
||||
return;
|
||||
|
||||
BattlegroundQueueTypeId bgQueueTypeId = GetQueueId();
|
||||
|
||||
BlockMovement(player);
|
||||
|
||||
WorldPackets::Battleground::PVPLogDataMessage pvpLogData;
|
||||
|
||||
@@ -238,7 +238,7 @@ void BattlegroundMgr::BuildBattlegroundStatusQueued(WorldPackets::Battleground::
|
||||
battlefieldStatus->WaitTime = GetMSTimeDiffToNow(joinTime);
|
||||
}
|
||||
|
||||
void BattlegroundMgr::BuildBattlegroundStatusFailed(WorldPackets::Battleground::BattlefieldStatusFailed* battlefieldStatus, Battleground* bg, Player* pPlayer, uint32 ticketId, uint32 arenaType, GroupJoinBattlegroundResult result, ObjectGuid const* errorGuid /*= nullptr*/)
|
||||
void BattlegroundMgr::BuildBattlegroundStatusFailed(WorldPackets::Battleground::BattlefieldStatusFailed* battlefieldStatus, Battleground* bg, Player* pPlayer, uint32 ticketId, GroupJoinBattlegroundResult result, ObjectGuid const* errorGuid /*= nullptr*/)
|
||||
{
|
||||
battlefieldStatus->Ticket.RequesterGuid = pPlayer->GetGUID();
|
||||
battlefieldStatus->Ticket.Id = ticketId;
|
||||
|
||||
@@ -90,7 +90,7 @@ class TC_GAME_API BattlegroundMgr
|
||||
void BuildBattlegroundStatusNeedConfirmation(WorldPackets::Battleground::BattlefieldStatusNeedConfirmation* battlefieldStatus, Battleground* bg, Player* player, uint32 ticketId, uint32 joinTime, uint32 timeout, uint32 arenaType);
|
||||
void BuildBattlegroundStatusActive(WorldPackets::Battleground::BattlefieldStatusActive* battlefieldStatus, Battleground* bg, Player* player, uint32 ticketId, uint32 joinTime, uint32 arenaType);
|
||||
void BuildBattlegroundStatusQueued(WorldPackets::Battleground::BattlefieldStatusQueued* battlefieldStatus, Battleground* bg, Player* player, uint32 ticketId, uint32 joinTime, BattlegroundQueueTypeId queueId, uint32 avgWaitTime, uint32 arenaType, bool asGroup);
|
||||
void BuildBattlegroundStatusFailed(WorldPackets::Battleground::BattlefieldStatusFailed* battlefieldStatus, Battleground* bg, Player* pPlayer, uint32 ticketId, uint32 arenaType, GroupJoinBattlegroundResult result, ObjectGuid const* errorGuid = nullptr);
|
||||
void BuildBattlegroundStatusFailed(WorldPackets::Battleground::BattlefieldStatusFailed* battlefieldStatus, Battleground* bg, Player* pPlayer, uint32 ticketId, GroupJoinBattlegroundResult result, ObjectGuid const* errorGuid = nullptr);
|
||||
void SendAreaSpiritHealerQueryOpcode(Player* player, Battleground* bg, ObjectGuid const& guid);
|
||||
|
||||
/* Battlegrounds */
|
||||
|
||||
@@ -112,7 +112,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
if (GetPlayer()->isUsingLfg())
|
||||
{
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, 0, ERR_LFG_CANT_USE_BATTLEGROUND);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, ERR_LFG_CANT_USE_BATTLEGROUND);
|
||||
SendPacket(battlefieldStatus.Write());
|
||||
return;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
if (!_player->CanJoinToBattleground(bg))
|
||||
{
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, 0, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
|
||||
SendPacket(battlefieldStatus.Write());
|
||||
return;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
{
|
||||
// player is already in random queue
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, 0, ERR_IN_RANDOM_BG);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, ERR_IN_RANDOM_BG);
|
||||
SendPacket(battlefieldStatus.Write());
|
||||
return;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
{
|
||||
// player is already in queue, can't start random queue
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, 0, ERR_IN_NON_RANDOM_BG);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, ERR_IN_NON_RANDOM_BG);
|
||||
SendPacket(battlefieldStatus.Write());
|
||||
return;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
if (!_player->HasFreeBattlegroundQueueId())
|
||||
{
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, 0, ERR_BATTLEGROUND_TOO_MANY_QUEUES);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, ERR_BATTLEGROUND_TOO_MANY_QUEUES);
|
||||
SendPacket(battlefieldStatus.Write());
|
||||
return;
|
||||
}
|
||||
@@ -207,7 +207,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPackets::Battleground::Batt
|
||||
if (err)
|
||||
{
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, 0, err, &errorGuid);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, err, &errorGuid);
|
||||
member->SendDirectMessage(battlefieldStatus.Write());
|
||||
continue;
|
||||
}
|
||||
@@ -330,7 +330,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPackets::Battleground::Battl
|
||||
{
|
||||
//send bg command result to show nice message
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, battlefieldPort.Ticket.Id, 0, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, battlefieldPort.Ticket.Id, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
|
||||
SendPacket(battlefieldStatus.Write());
|
||||
battlefieldPort.AcceptedInvite = false;
|
||||
TC_LOG_DEBUG("bg.battleground", "Player %s (%s) has a deserter debuff, do not port him to battleground!", _player->GetName().c_str(), _player->GetGUID().ToString().c_str());
|
||||
@@ -565,7 +565,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPackets::Battleground::Battl
|
||||
if (err)
|
||||
{
|
||||
WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus;
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, arenatype, err, &errorGuid);
|
||||
sBattlegroundMgr->BuildBattlegroundStatusFailed(&battlefieldStatus, bg, _player, 0, err, &errorGuid);
|
||||
member->SendDirectMessage(battlefieldStatus.Write());
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user