aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs25
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5f87347..ced81ad 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7026,24 +7026,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7026 { 7026 {
7027 m_host.AddScriptLPS(1); 7027 m_host.AddScriptLPS(1);
7028 7028
7029 LSL_List AttachmentsList = new LSL_List();
7030
7031 ScenePresence av = World.GetScenePresence((UUID)id); 7029 ScenePresence av = World.GetScenePresence((UUID)id);
7032 7030
7033 string NOT_FOUND = "NOT_FOUND"; 7031 if (av == null || av.IsDeleted)
7034 string NOT_ON_REGION = "NOT ON REGION"; 7032 return new LSL_List("NOT_FOUND");
7035 7033
7036 if (av == null) 7034 if (av.IsChildAgent || av.IsInTransit)
7037 return new LSL_List(NOT_FOUND); 7035 return new LSL_List("NOT_ON_REGION");
7038 if (av.IsChildAgent)
7039 return new LSL_List(NOT_ON_REGION);
7040 7036
7041 List<SceneObjectGroup> AttachmentsKeys; 7037 LSL_List AttachmentsList = new LSL_List();
7038 List<SceneObjectGroup> Attachments;
7042 7039
7043 AttachmentsKeys = av.GetAttachments(); 7040 Attachments = av.GetAttachments();
7044 7041
7045 foreach (SceneObjectGroup AttachmentKey in AttachmentsKeys) 7042 foreach (SceneObjectGroup Attachment in Attachments)
7046 AttachmentsList.Add(new LSL_Key(AttachmentKey.FromItemID.ToString())); 7043 {
7044 if(Attachment.HasPrivateAttachmentPoint)
7045 continue;
7046 AttachmentsList.Add(new LSL_Key(Attachment.UUID.ToString()));
7047 }
7047 7048
7048 return AttachmentsList; 7049 return AttachmentsList;
7049 } 7050 }