refactor(Scripts/VioletHold): Modernize Violet Hold dungeon scripts (#25187)

Co-authored-by: joschiwald <joschiwald@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Andrew 2026-04-11 13:02:28 -03:00 committed by GitHub
parent 25b928b094
commit 272da9fbad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1745 additions and 2222 deletions

View file

@ -1810,12 +1810,13 @@ void Map::RemoveAllObjectsInRemoveList()
}
}
uint32 Map::GetPlayersCountExceptGMs() const
uint32 Map::GetPlayersCountExceptGMs(bool aliveOnly /*= false*/) const
{
uint32 count = 0;
for (MapRefMgr::const_iterator itr = m_mapRefMgr.begin(); itr != m_mapRefMgr.end(); ++itr)
if (!itr->GetSource()->IsGameMaster())
++count;
for (auto const& ref : m_mapRefMgr)
if (Player* player = ref.GetSource())
if (!player->IsGameMaster() && (!aliveOnly || (player->IsAlive() && !player->HasSpiritOfRedemptionAura())))
++count;
return count;
}