From 71797af540bfa1ccb1ccfe856b42350844531607 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 5 Mar 2010 23:35:49 +0000 Subject: refactor: move another AttachObject method --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 44 ---------------------- 1 file changed, 44 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6a5dc56..bd3b433 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1874,50 +1874,6 @@ namespace OpenSim.Region.Framework.Scenes } } - /// - /// This registers the item as attached in a user's inventory - /// - /// - /// - /// - /// - public void AttachObject(IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) - { -// m_log.DebugFormat( -// "[USER INVENTORY]: Updating attachment {0} for {1} at {2} using item ID {3}", -// att.Name, remoteClient.Name, AttachmentPt, itemID); - - if (UUID.Zero == itemID) - { - m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error inventory item ID."); - return; - } - - if (0 == AttachmentPt) - { - m_log.Error("[SCENE INVENTORY]: Unable to save attachment. Error attachment point."); - return; - } - - if (null == att.RootPart) - { - m_log.Error("[SCENE INVENTORY]: Unable to save attachment for a prim without the rootpart!"); - return; - } - - ScenePresence presence; - if (TryGetAvatar(remoteClient.AgentId, out presence)) - { - // XXYY!! - InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); - item = InventoryService.GetItem(item); - presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */); - - if (m_AvatarFactory != null) - m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); - } - } - public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) { SceneObjectPart part = GetSceneObjectPart(itemID); -- cgit v1.1