From 395f343498bc429c0360201991147c6e089b0730 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 6 Mar 2010 00:07:47 +0000 Subject: refactor: Move DetachSingleAttachmentToInv to region module need to rationalize method names later --- OpenSim/Region/Framework/Scenes/Scene.cs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c83132f..7c0375e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2646,10 +2646,12 @@ namespace OpenSim.Region.Framework.Scenes public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) { client.OnRezSingleAttachmentFromInv += RezSingleAttachment; - client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; - client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv; + client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; client.OnObjectAttach += m_sceneGraph.AttachObject; client.OnObjectDetach += m_sceneGraph.DetachObject; + + if (AttachmentsModule != null) + client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; } public virtual void SubscribeToClientTeleportEvents(IClientAPI client) @@ -2696,8 +2698,7 @@ namespace OpenSim.Region.Framework.Scenes } protected virtual void UnsubscribeToClientEvents(IClientAPI client) - { - + { } /// @@ -2719,7 +2720,6 @@ namespace OpenSim.Region.Framework.Scenes UnSubscribeToClientNetworkEvents(client); - // EventManager.TriggerOnNewClient(client); } @@ -2799,12 +2799,14 @@ namespace OpenSim.Region.Framework.Scenes } public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) - { - client.OnRezSingleAttachmentFromInv -= RezSingleAttachment; + { client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; - client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv; + client.OnRezSingleAttachmentFromInv -= RezSingleAttachment; client.OnObjectAttach -= m_sceneGraph.AttachObject; client.OnObjectDetach -= m_sceneGraph.DetachObject; + + if (AttachmentsModule != null) + client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; } public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) -- cgit v1.1