diff options
author | Justin Clark-Casey (justincc) | 2010-03-06 00:07:47 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-03-06 00:07:47 +0000 |
commit | 395f343498bc429c0360201991147c6e089b0730 (patch) | |
tree | 70dedf88258e3496a5cbd267bc5db7e067b88e57 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-395f343498bc429c0360201991147c6e089b0730.zip opensim-SC_OLD-395f343498bc429c0360201991147c6e089b0730.tar.gz opensim-SC_OLD-395f343498bc429c0360201991147c6e089b0730.tar.bz2 opensim-SC_OLD-395f343498bc429c0360201991147c6e089b0730.tar.xz |
refactor: Move DetachSingleAttachmentToInv to region module
need to rationalize method names later
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 35 |
1 files changed, 1 insertions, 34 deletions
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 | |||
452 | if (group != null) | 452 | if (group != null) |
453 | { | 453 | { |
454 | //group.DetachToGround(); | 454 | //group.DetachToGround(); |
455 | m_parentScene.DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient); | 455 | m_parentScene.AttachmentsModule.ShowDetachInUserInventory(group.GetFromItemID(), remoteClient); |
456 | } | 456 | } |
457 | } | 457 | } |
458 | 458 | ||
@@ -574,39 +574,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
574 | return null; | 574 | return null; |
575 | } | 575 | } |
576 | 576 | ||
577 | // What makes this method odd and unique is it tries to detach using an UUID.... Yay for standards. | ||
578 | // To LocalId or UUID, *THAT* is the question. How now Brown UUID?? | ||
579 | public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) | ||
580 | { | ||
581 | if (itemID == UUID.Zero) // If this happened, someone made a mistake.... | ||
582 | return; | ||
583 | |||
584 | // We can NOT use the dictionries here, as we are looking | ||
585 | // for an entity by the fromAssetID, which is NOT the prim UUID | ||
586 | // | ||
587 | List<EntityBase> detachEntities = GetEntities(); | ||
588 | SceneObjectGroup group; | ||
589 | |||
590 | foreach (EntityBase entity in detachEntities) | ||
591 | { | ||
592 | if (entity is SceneObjectGroup) | ||
593 | { | ||
594 | group = (SceneObjectGroup)entity; | ||
595 | if (group.GetFromItemID() == itemID) | ||
596 | { | ||
597 | m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); | ||
598 | group.DetachToInventoryPrep(); | ||
599 | m_log.Debug("[DETACH]: Saving attachpoint: " + | ||
600 | ((uint)group.GetAttachmentPoint()).ToString()); | ||
601 | m_parentScene.UpdateKnownItem(remoteClient, group, | ||
602 | group.GetFromItemID(), group.OwnerID); | ||
603 | m_parentScene.DeleteSceneObject(group, false); | ||
604 | return; | ||
605 | } | ||
606 | } | ||
607 | } | ||
608 | } | ||
609 | |||
610 | protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) | 577 | protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) |
611 | { | 578 | { |
612 | ScenePresence newAvatar = null; | 579 | ScenePresence newAvatar = null; |