Core/Maps: Add Map::DoOnPlayers helper function
Port From (https://github.com/TrinityCore/TrinityCore/commit/543a7b79c3e5259ed3da413a6d91f00dfd85977e)
This commit is contained in:
@@ -3814,6 +3814,12 @@ namespace Game.Maps
|
||||
i_worldObjects.Remove(obj);
|
||||
}
|
||||
|
||||
public void DoOnPlayers(Action<Player> action)
|
||||
{
|
||||
foreach (var player in GetPlayers())
|
||||
action(player);
|
||||
}
|
||||
|
||||
public List<Player> GetPlayers()
|
||||
{
|
||||
return m_activePlayers;
|
||||
|
||||
Reference in New Issue
Block a user