diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 823a4e5..fa7ee21 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -3835,6 +3835,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3835 | return result; | 3835 | return result; |
3836 | } | 3836 | } |
3837 | 3837 | ||
3838 | public LSL_List osGetNPCList() | ||
3839 | { | ||
3840 | CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); | ||
3841 | m_host.AddScriptLPS(1); | ||
3842 | |||
3843 | LSL_List result = new LSL_List(); | ||
3844 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) | ||
3845 | { | ||
3846 | if (avatar != null && avatar.IsNPC) | ||
3847 | { | ||
3848 | result.Add(new LSL_String(avatar.UUID.ToString())); | ||
3849 | result.Add(new LSL_Vector(avatar.AbsolutePosition)); | ||
3850 | result.Add(new LSL_String(avatar.Name)); | ||
3851 | } | ||
3852 | }); | ||
3853 | |||
3854 | return result; | ||
3855 | } | ||
3856 | |||
3838 | /// <summary> | 3857 | /// <summary> |
3839 | /// Convert a unix time to a llGetTimestamp() like string | 3858 | /// Convert a unix time to a llGetTimestamp() like string |
3840 | /// </summary> | 3859 | /// </summary> |