From 1de68b34d959570c6dc5de42e8dac5e36f960273 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 30 Aug 2011 22:25:38 +0100 Subject: refactor: migrate DropObject handling fully into AttachmentsModule from Scene --- OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 8 ++++---- OpenSim/Region/Framework/Scenes/Scene.cs | 2 -- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 7 ------- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 86f5a0f..c910289 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs @@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Interfaces /// /// /// The scene object that was attached. Null if the scene object could not be found - UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); + ISceneEntity RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt); /// /// Rez an attachment from user inventory @@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Interfaces /// False is required so that we don't attempt to update information when a user enters a scene with the /// attachment already correctly set up in inventory. /// The uuid of the scene object that was attached. Null if the scene object could not be found - UUID RezSingleAttachmentFromInventory( + ISceneEntity RezSingleAttachmentFromInventory( IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus); /// @@ -105,9 +105,9 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Detach the given item to the ground. /// - /// + /// /// - void DetachSingleAttachmentToGround(UUID sceneObjectID, IClientAPI remoteClient); + void DetachSingleAttachmentToGround(uint objectLocalID, IClientAPI remoteClient); /// /// 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 45d1a0e..e0250de 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2772,7 +2772,6 @@ namespace OpenSim.Region.Framework.Scenes client.OnUndo += m_sceneGraph.HandleUndo; client.OnRedo += m_sceneGraph.HandleRedo; client.OnObjectDescription += m_sceneGraph.PrimDescription; - client.OnObjectDrop += m_sceneGraph.DropObject; client.OnObjectIncludeInSearch += m_sceneGraph.MakeObjectSearchable; client.OnObjectOwner += ObjectOwner; } @@ -2899,7 +2898,6 @@ namespace OpenSim.Region.Framework.Scenes client.OnUndo -= m_sceneGraph.HandleUndo; client.OnRedo -= m_sceneGraph.HandleRedo; client.OnObjectDescription -= m_sceneGraph.PrimDescription; - client.OnObjectDrop -= m_sceneGraph.DropObject; client.OnObjectIncludeInSearch -= m_sceneGraph.MakeObjectSearchable; client.OnObjectOwner -= ObjectOwner; } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0582586..76ed55c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -548,13 +548,6 @@ namespace OpenSim.Region.Framework.Scenes m_activeScripts += number; } - public void DropObject(uint objectLocalID, IClientAPI remoteClient) - { - SceneObjectGroup group = GetGroupByPrim(objectLocalID); - if (group != null) - m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient); - } - protected internal void HandleUndo(IClientAPI remoteClient, UUID primId) { if (primId != UUID.Zero) -- cgit v1.1