aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
new file mode 100644
index 0000000..5581fc3
--- /dev/null
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
@@ -0,0 +1,35 @@
1using System;
2
3using OpenMetaverse;
4using OpenSim.Region.Framework.Scenes;
5
6namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
7{
8 public class SPAvatarAttachment : IAvatarAttachment
9 {
10 private readonly Scene m_rootScene;
11 private readonly IAvatar m_parent;
12 private readonly int m_location;
13 private readonly UUID m_itemId;
14 private readonly UUID m_assetId;
15
16 public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId)
17 {
18 m_rootScene = rootScene;
19 m_parent = self;
20 m_location = location;
21 m_itemId = itemId;
22 m_assetId = assetId;
23 }
24
25 public int Location { get { return m_location; } }
26
27 public IObject Asset
28 {
29 get
30 {
31 return new SOPObject(m_rootScene, m_rootScene.GetSceneObjectPart(m_assetId).LocalId);
32 }
33 }
34 }
35}