From 2f2ec10172a5a68caa909cc153ebcf7a14192892 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 11 Jun 2007 16:13:52 +0000
Subject: A few small changes and hopefully fixed the nant build problem
(OpenSim.Framework came before OpenSim.Framework.Console, so was causing a
problem as OpenSim.Framework references OpenSim.Framework.Console).
---
OpenSim/OpenSim.Region/World/World.cs | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
(limited to 'OpenSim/OpenSim.Region/World/World.cs')
diff --git a/OpenSim/OpenSim.Region/World/World.cs b/OpenSim/OpenSim.Region/World/World.cs
index e316e27..3415f08 100644
--- a/OpenSim/OpenSim.Region/World/World.cs
+++ b/OpenSim/OpenSim.Region/World/World.cs
@@ -20,6 +20,8 @@ using OpenSim.Region.Estate;
namespace OpenSim.Region
{
+ public delegate bool FilterAvatarList(Avatar avatar);
+
public partial class World : WorldBase, ILocalStorageReceiver, IScriptAPI
{
protected System.Timers.Timer m_heartbeatTimer = new System.Timers.Timer();
@@ -592,6 +594,25 @@ namespace OpenSim.Region
return result;
}
+ ///
+ /// Request a filtered list of Avatars in this World
+ ///
+ ///
+ public List RequestAvatarList(FilterAvatarList filter)
+ {
+ List result = new List();
+
+ foreach (Avatar avatar in Avatars.Values)
+ {
+ if (filter(avatar))
+ {
+ result.Add(avatar);
+ }
+ }
+
+ return result;
+ }
+
public Avatar RequestAvatar(LLUUID avatarID)
{
if (this.Avatars.ContainsKey(avatarID))
--
cgit v1.1