mirror of
https://github.com/opensim/opensim.git
synced 2026-08-14 17:55:39 +08:00
refactor: Move DetachSingleAttachmentToInv to region module
need to rationalize method names later
This commit is contained in:
@@ -1858,7 +1858,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
if (att == null)
|
||||
{
|
||||
DetachSingleAttachmentToInv(itemID, remoteClient);
|
||||
AttachmentsModule.ShowDetachInUserInventory(itemID, remoteClient);
|
||||
return UUID.Zero;
|
||||
}
|
||||
|
||||
@@ -1904,24 +1904,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero);
|
||||
}
|
||||
|
||||
public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
||||
{
|
||||
presence.Appearance.DetachAttachment(itemID);
|
||||
|
||||
// Save avatar attachment information
|
||||
if (m_AvatarFactory != null)
|
||||
{
|
||||
m_log.Info("[SCENE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId + ", ItemID: " + itemID);
|
||||
m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
|
||||
}
|
||||
}
|
||||
|
||||
m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient);
|
||||
}
|
||||
|
||||
public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID)
|
||||
{
|
||||
EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID);
|
||||
|
||||
Reference in New Issue
Block a user