From 7bb070be55d0efe3a272f170055bdf02ee41aa65 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 29 Jun 2009 18:07:30 +0000 Subject: Thank you kindly, Snowdrop/Snowcrash for a patch that: This patch makes the worn attachments accessible to MRM scripting --- .../Scripting/Minimodule/SPAvatarAttachment.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs') 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 @@ +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); + } + } + } +} -- cgit v1.1