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/SceneGraph.cs | 35 +-------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 48744d7..380722d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -452,7 +452,7 @@ namespace OpenSim.Region.Framework.Scenes if (group != null) { //group.DetachToGround(); - m_parentScene.DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient); + m_parentScene.AttachmentsModule.ShowDetachInUserInventory(group.GetFromItemID(), remoteClient); } } @@ -574,39 +574,6 @@ namespace OpenSim.Region.Framework.Scenes return null; } - // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. - // To LocalId or UUID, *THAT* is the question. How now Brown UUID?? - public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) - { - if (itemID == UUID.Zero) // If this happened, someone made a mistake.... - return; - - // We can NOT use the dictionries here, as we are looking - // for an entity by the fromAssetID, which is NOT the prim UUID - // - List detachEntities = GetEntities(); - SceneObjectGroup group; - - foreach (EntityBase entity in detachEntities) - { - if (entity is SceneObjectGroup) - { - group = (SceneObjectGroup)entity; - if (group.GetFromItemID() == itemID) - { - m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); - group.DetachToInventoryPrep(); - m_log.Debug("[DETACH]: Saving attachpoint: " + - ((uint)group.GetAttachmentPoint()).ToString()); - m_parentScene.UpdateKnownItem(remoteClient, group, - group.GetFromItemID(), group.OwnerID); - m_parentScene.DeleteSceneObject(group, false); - return; - } - } - } - } - protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) { ScenePresence newAvatar = null; -- cgit v1.1