mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
refactor: migrate DropObject handling fully into AttachmentsModule from Scene
This commit is contained in:
@@ -64,7 +64,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// <param name="itemID"></param>
|
||||
/// <param name="AttachmentPt"></param>
|
||||
/// <returns>The scene object that was attached. Null if the scene object could not be found</returns>
|
||||
UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
|
||||
ISceneEntity RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// <returns>The uuid of the scene object that was attached. Null if the scene object could not be found</returns>
|
||||
UUID RezSingleAttachmentFromInventory(
|
||||
ISceneEntity RezSingleAttachmentFromInventory(
|
||||
IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus);
|
||||
|
||||
/// <summary>
|
||||
@@ -105,9 +105,9 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// <summary>
|
||||
/// Detach the given item to the ground.
|
||||
/// </summary>
|
||||
/// <param name="sceneObjectID"></param>
|
||||
/// <param name="objectLocalID"></param>
|
||||
/// <param name="remoteClient"></param>
|
||||
void DetachSingleAttachmentToGround(UUID sceneObjectID, IClientAPI remoteClient);
|
||||
void DetachSingleAttachmentToGround(uint objectLocalID, IClientAPI remoteClient);
|
||||
|
||||
/// <summary>
|
||||
/// Detach the given item so that it remains in the user's inventory.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user