aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
diff options
context:
space:
mode:
authorCharles Krinke2009-06-29 18:07:30 +0000
committerCharles Krinke2009-06-29 18:07:30 +0000
commit7bb070be55d0efe3a272f170055bdf02ee41aa65 (patch)
treed24437108a7ae8fab611bb8b1706db967ac8f719 /OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
parent* Changing List to Dictionary in PacketQueue.Dequeue for great justice (and p... (diff)
downloadopensim-SC_OLD-7bb070be55d0efe3a272f170055bdf02ee41aa65.zip
opensim-SC_OLD-7bb070be55d0efe3a272f170055bdf02ee41aa65.tar.gz
opensim-SC_OLD-7bb070be55d0efe3a272f170055bdf02ee41aa65.tar.bz2
opensim-SC_OLD-7bb070be55d0efe3a272f170055bdf02ee41aa65.tar.xz
Thank you kindly, Snowdrop/Snowcrash for a patch that:
This patch makes the worn attachments accessible to MRM scripting
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index 8fed89c..6fd36bf 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -26,15 +26,22 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Reflection;
30using System.Collections;
31using System.Collections.Generic;
32
29using OpenMetaverse; 33using OpenMetaverse;
30using OpenSim.Region.Framework.Scenes; 34using OpenSim.Region.Framework.Scenes;
31 35
36using log4net;
37
32namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 38namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
33{ 39{
34 class SPAvatar : System.MarshalByRefObject, IAvatar 40 class SPAvatar : System.MarshalByRefObject, IAvatar
35 { 41 {
36 private readonly Scene m_rootScene; 42 private readonly Scene m_rootScene;
37 private readonly UUID m_ID; 43 private readonly UUID m_ID;
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
38 45
39 public SPAvatar(Scene scene, UUID ID) 46 public SPAvatar(Scene scene, UUID ID)
40 { 47 {
@@ -63,5 +70,26 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
63 get { return GetSP().AbsolutePosition; } 70 get { return GetSP().AbsolutePosition; }
64 set { GetSP().TeleportWithMomentum(value); } 71 set { GetSP().TeleportWithMomentum(value); }
65 } 72 }
73
74 #region IAvatar implementation
75 public IAvatarAttachment[] Attachments
76 {
77 get {
78 List<IAvatarAttachment> attachments = new List<IAvatarAttachment>();
79
80 Hashtable internalAttachments = GetSP().Appearance.GetAttachments();
81 if(internalAttachments != null)
82 {
83 foreach(DictionaryEntry element in internalAttachments)
84 {
85 Hashtable attachInfo = (Hashtable)element.Value;
86 attachments.Add(new SPAvatarAttachment(m_rootScene, this, (int)element.Key, new UUID((string)attachInfo["item"]), new UUID((string)attachInfo["asset"])));
87 }
88 }
89
90 return attachments.ToArray();
91 }
92 }
93 #endregion
66 } 94 }
67} 95}