Remove IAttachmentsModule.SetAttachmentInventoryStatus() from public interface

No core module is calling and it makes more sense to call methods such as AttachObject() which attach both to the avatar and update inventory appropriately
viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-09-13 21:05:03 +01:00
parent 366de0a7b5
commit cd153a20b7
2 changed files with 13 additions and 16 deletions

View File

@ -300,12 +300,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return null; return null;
} }
public UUID SetAttachmentInventoryStatus( /// <summary>
/// Update the user inventory to the attachment of an item
/// </summary>
/// <param name="att"></param>
/// <param name="remoteClient"></param>
/// <param name="itemID"></param>
/// <param name="AttachmentPt"></param>
/// <returns></returns>
protected UUID SetAttachmentInventoryStatus(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
{ {
m_log.DebugFormat( // m_log.DebugFormat(
"[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", // "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
remoteClient.Name, att.Name, itemID); // remoteClient.Name, att.Name, itemID);
if (!att.IsDeleted) if (!att.IsDeleted)
AttachmentPt = att.RootPart.AttachmentPoint; AttachmentPt = att.RootPart.AttachmentPoint;
@ -387,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
// Save avatar attachment information // Save avatar attachment information
if (m_scene.AvatarFactory != null) if (m_scene.AvatarFactory != null)
{ {
m_log.Debug("[ATTACHMENTS MODULE]: Dettaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID);
m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
} }
} }

View File

@ -109,17 +109,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="remoteClient"></param> /// <param name="remoteClient"></param>
void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient);
/// <summary>
/// Update the user inventory to the attachment of an item
/// </summary>
/// <param name="att"></param>
/// <param name="remoteClient"></param>
/// <param name="itemID"></param>
/// <param name="AttachmentPt"></param>
/// <returns></returns>
UUID SetAttachmentInventoryStatus(
SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt);
/// <summary> /// <summary>
/// Update the user inventory to show a detach. /// Update the user inventory to show a detach.