mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-26 13:35:54 +00:00
refactor(Core): SendDirectMessage (#23230)
This commit is contained in:
@@ -2123,7 +2123,7 @@ void Guild::BroadcastToGuild(WorldSession* session, bool officerOnly, std::strin
|
||||
for (auto const& [guid, member] : m_members)
|
||||
if (Player* player = member.FindPlayer())
|
||||
if (_HasRankRight(player, officerOnly ? GR_RIGHT_OFFCHATLISTEN : GR_RIGHT_GCHATLISTEN) && !player->GetSocial()->HasIgnore(session->GetPlayer()->GetGUID()))
|
||||
player->GetSession()->SendPacket(&data);
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2132,14 +2132,14 @@ void Guild::BroadcastPacketToRank(WorldPacket const* packet, uint8 rankId) const
|
||||
for (auto const& [guid, member] : m_members)
|
||||
if (member.IsRank(rankId))
|
||||
if (Player* player = member.FindPlayer())
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void Guild::BroadcastPacket(WorldPacket const* packet) const
|
||||
{
|
||||
for (auto const& [guid, member] : m_members)
|
||||
if (Player* player = member.FindPlayer())
|
||||
player->GetSession()->SendPacket(packet);
|
||||
player->SendDirectMessage(packet);
|
||||
}
|
||||
|
||||
void Guild::MassInviteToEvent(WorldSession* session, uint32 minLevel, uint32 maxLevel, uint32 minRank)
|
||||
|
||||
Reference in New Issue
Block a user