From 460946ad62b682c7a942751f192ca9e96b662f0e Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Mon, 3 Oct 2011 16:44:32 -0700 Subject: Removed redundant code in AttachmentsModule and simplified interfaces which converted back and forth between ScenePresence and IClientAPI. More to be done still. --- .../Framework/Interfaces/IAttachmentsModule.cs | 35 ++++------------------ OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- 2 files changed, 7 insertions(+), 30 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 8d3366c..1a0423f 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs @@ -58,17 +58,6 @@ namespace OpenSim.Region.Framework.Interfaces void DeleteAttachmentsFromScene(IScenePresence sp, bool silent); /// - /// Attach an object to an avatar from the world. - /// - /// - /// - /// - /// - /// - void AttachObject( - IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); - - /// /// Attach an object to an avatar /// /// @@ -76,17 +65,7 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// true if the object was successfully attached, false otherwise - bool AttachObject( - IClientAPI remoteClient, SceneObjectGroup grp, uint AttachmentPt, bool silent); - - /// - /// Rez an attachment from user inventory and change inventory status to match. - /// - /// - /// - /// - /// The scene object that was attached. Null if the scene object could not be found - ISceneEntity RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); + bool AttachObject(IScenePresence sp, SceneObjectGroup grp, uint AttachmentPt, bool silent); /// /// Rez an attachment from user inventory and change inventory status to match. @@ -95,17 +74,15 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// The scene object that was attached. Null if the scene object could not be found - ISceneEntity RezSingleAttachmentFromInventory(ScenePresence sp, UUID itemID, uint AttachmentPt); + ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt); /// /// Rez multiple attachments from a user's inventory /// - /// + /// /// /// - void RezMultipleAttachmentsFromInventory( - IClientAPI remoteClient, - List> rezlist); + void RezMultipleAttachmentsFromInventory(IScenePresence sp,List> rezlist); /// /// Detach an object from the avatar. @@ -121,9 +98,9 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Detach the given item to the ground. /// + /// /// - /// - void DetachSingleAttachmentToGround(uint objectLocalID, IClientAPI remoteClient); + void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID); /// /// Detach the given item so that it remains in the user's inventory. diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index eadec09..0e5a7d2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2451,7 +2451,7 @@ namespace OpenSim.Region.Framework.Scenes RootPrim.RemFlag(PrimFlags.TemporaryOnRez); if (AttachmentsModule != null) - AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false); + AttachmentsModule.AttachObject(sp, grp, 0, false); } else { -- cgit v1.1