diff options
author | UbitUmarov | 2017-06-26 20:42:49 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-26 20:42:49 +0100 |
commit | e53f4399812224939e4ebec6790a9addb38cca95 (patch) | |
tree | 1b0475c53ec34cd1f387baccc50bce206ad1e4a3 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | also on the actual source file (diff) | |
download | opensim-SC-e53f4399812224939e4ebec6790a9addb38cca95.zip opensim-SC-e53f4399812224939e4ebec6790a9addb38cca95.tar.gz opensim-SC-e53f4399812224939e4ebec6790a9addb38cca95.tar.bz2 opensim-SC-e53f4399812224939e4ebec6790a9addb38cca95.tar.xz |
add osGetNPCList()
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> |