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:
parent
25b928b094
commit
272da9fbad
12 changed files with 1745 additions and 2222 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue