mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
refactor(Core): SendDirectMessage (#23230)
This commit is contained in:
@@ -458,7 +458,7 @@ void Battlefield::BroadcastPacketToZone(WorldPacket const* data) const
|
||||
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
|
||||
for (GuidUnorderedSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
|
||||
@@ -466,7 +466,7 @@ void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const
|
||||
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
|
||||
for (GuidUnorderedSet::const_iterator itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
|
||||
@@ -474,7 +474,7 @@ void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const
|
||||
for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team)
|
||||
for (GuidUnorderedSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
player->GetSession()->SendPacket(data);
|
||||
player->SendDirectMessage(data);
|
||||
}
|
||||
|
||||
void Battlefield::SendWarning(uint8 id, WorldObject const* target /*= nullptr*/)
|
||||
@@ -663,7 +663,7 @@ void Battlefield::SendAreaSpiritHealerQueryOpcode(Player* player, const ObjectGu
|
||||
|
||||
data << guid << time;
|
||||
ASSERT(player);
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
|
||||
Reference in New Issue
Block a user