diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 43 |
1 files changed, 10 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index eb51019..6ebd048 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1106,18 +1106,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1106 | if (folder == null) | 1106 | if (folder == null) |
1107 | return; | 1107 | return; |
1108 | 1108 | ||
1109 | m_log.DebugFormat("[AGENT INVENTORY]: Send Inventory Folder {0} Update to {1} {2}", folder.Name, client.FirstName, client.LastName); | 1109 | // Fetch the folder contents |
1110 | InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); | 1110 | InventoryCollection contents = InventoryService.GetFolderContent(client.AgentId, folder.ID); |
1111 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | 1111 | |
1112 | containingFolder.ID = folder.ID; | 1112 | // Fetch the folder itself to get its current version |
1113 | containingFolder.Owner = client.AgentId; | 1113 | InventoryFolderBase containingFolder = new InventoryFolderBase(folder.ID, client.AgentId); |
1114 | containingFolder = InventoryService.GetFolder(containingFolder); | 1114 | containingFolder = InventoryService.GetFolder(containingFolder); |
1115 | if (containingFolder != null) | ||
1116 | { | ||
1117 | int version = containingFolder.Version; | ||
1118 | 1115 | ||
1119 | client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, version, fetchFolders, fetchItems); | 1116 | //m_log.DebugFormat("[AGENT INVENTORY]: Sending inventory folder contents ({0} nodes) for \"{1}\" to {2} {3}", |
1120 | } | 1117 | // contents.Folders.Count + contents.Items.Count, containingFolder.Name, client.FirstName, client.LastName); |
1118 | |||
1119 | if (containingFolder != null) | ||
1120 | client.SendInventoryFolderDetails(client.AgentId, folder.ID, contents.Items, contents.Folders, containingFolder.Version, fetchFolders, fetchItems); | ||
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | /// <summary> | 1123 | /// <summary> |
@@ -1846,35 +1846,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1846 | EventManager.TriggerOnAttach(localID, itemID, avatarID); | 1846 | EventManager.TriggerOnAttach(localID, itemID, avatarID); |
1847 | } | 1847 | } |
1848 | 1848 | ||
1849 | /// <summary> | ||
1850 | /// Called when the client receives a request to rez a single attachment on to the avatar from inventory | ||
1851 | /// (RezSingleAttachmentFromInv packet). | ||
1852 | /// </summary> | ||
1853 | /// <param name="remoteClient"></param> | ||
1854 | /// <param name="itemID"></param> | ||
1855 | /// <param name="AttachmentPt"></param> | ||
1856 | /// <returns></returns> | ||
1857 | public UUID RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | ||
1858 | { | ||
1859 | m_log.DebugFormat("[USER INVENTORY]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name); | ||
1860 | |||
1861 | SceneObjectGroup att = m_sceneGraph.RezSingleAttachment(remoteClient, itemID, AttachmentPt); | ||
1862 | |||
1863 | if (att == null) | ||
1864 | { | ||
1865 | AttachmentsModule.ShowDetachInUserInventory(itemID, remoteClient); | ||
1866 | return UUID.Zero; | ||
1867 | } | ||
1868 | |||
1869 | return AttachmentsModule.SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt); | ||
1870 | } | ||
1871 | |||
1872 | public void RezMultipleAttachments(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, | 1849 | public void RezMultipleAttachments(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, |
1873 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) | 1850 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) |
1874 | { | 1851 | { |
1875 | foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) | 1852 | foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) |
1876 | { | 1853 | { |
1877 | RezSingleAttachment(remoteClient, obj.ItemID, obj.AttachmentPt); | 1854 | AttachmentsModule.RezSingleAttachmentFromInventory(remoteClient, obj.ItemID, obj.AttachmentPt); |
1878 | } | 1855 | } |
1879 | } | 1856 | } |
1880 | 1857 | ||