aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs
blob: 5581fc34a5c02be2e3f63bd381c4dcbd5e8d50f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;

using OpenMetaverse;
using OpenSim.Region.Framework.Scenes;

namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
{
    public class SPAvatarAttachment : IAvatarAttachment
	{
        private readonly Scene m_rootScene;
		private readonly IAvatar m_parent;
		private readonly int m_location;
		private readonly UUID m_itemId;
		private readonly UUID m_assetId;
		
		public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId)
		{
			m_rootScene = rootScene;
			m_parent = self;
			m_location = location;
			m_itemId = itemId;
			m_assetId = assetId;
		}
		
		public int Location { get { return m_location; } }
		
		public IObject Asset
		{
			get
			{
				return new SOPObject(m_rootScene, m_rootScene.GetSceneObjectPart(m_assetId).LocalId);
			}
		}
	}
}