mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 08:46:09 +00:00
feat(Core/Battleground): rework bg queue system (#10817)
This commit is contained in:
@@ -2189,6 +2189,11 @@ ObjectGuid Group::GetLeaderGUID() const
|
||||
return m_leaderGuid;
|
||||
}
|
||||
|
||||
Player* Group::GetLeader()
|
||||
{
|
||||
return ObjectAccessor::FindConnectedPlayer(m_leaderGuid);
|
||||
}
|
||||
|
||||
ObjectGuid Group::GetGUID() const
|
||||
{
|
||||
return m_guid;
|
||||
@@ -2425,3 +2430,15 @@ void Group::SetDifficultyChangePrevention(DifficultyPreventionChangeType type)
|
||||
_difficultyChangePreventionTime = GameTime::GetGameTime().count() + MINUTE;
|
||||
_difficultyChangePreventionType = type;
|
||||
}
|
||||
|
||||
void Group::DoForAllMembers(std::function<void(Player*)> const& worker)
|
||||
{
|
||||
for (GroupReference* itr = GetFirstMember(); itr != nullptr; itr = itr->next())
|
||||
{
|
||||
Player* member = itr->GetSource();
|
||||
if (!member)
|
||||
continue;
|
||||
|
||||
worker(member);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user