diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index d3e414f..55b100b 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -472,8 +472,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
472 | /// <param name="fetchItems"></param> | 472 | /// <param name="fetchItems"></param> |
473 | /// <param name="sortOrder"></param> | 473 | /// <param name="sortOrder"></param> |
474 | /// <returns>null if the inventory look up failed</returns> | 474 | /// <returns>null if the inventory look up failed</returns> |
475 | public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, | 475 | public InventoryCollection HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, |
476 | bool fetchFolders, bool fetchItems, int sortOrder) | 476 | bool fetchFolders, bool fetchItems, int sortOrder, out int version) |
477 | { | 477 | { |
478 | // m_log.DebugFormat( | 478 | // m_log.DebugFormat( |
479 | // "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", | 479 | // "[INVENTORY CACHE]: Fetching folders ({0}), items ({1}) from {2} for agent {3}", |
@@ -487,11 +487,31 @@ namespace OpenSim.Region.Framework.Scenes | |||
487 | InventoryFolderImpl fold; | 487 | InventoryFolderImpl fold; |
488 | if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null) | 488 | if ((fold = CommsManager.UserProfileCacheService.LibraryRoot.FindFolder(folderID)) != null) |
489 | { | 489 | { |
490 | return fold.RequestListOfItems(); | 490 | version = 0; |
491 | InventoryCollection ret = new InventoryCollection(); | ||
492 | ret.Folders = new List<InventoryFolderBase>(); | ||
493 | ret.Items = fold.RequestListOfItems(); | ||
494 | |||
495 | return ret; | ||
491 | } | 496 | } |
492 | 497 | ||
493 | InventoryCollection contents = InventoryService.GetFolderContent(agentID, folderID); | 498 | InventoryCollection contents = InventoryService.GetFolderContent(agentID, folderID); |
494 | return contents.Items; | 499 | |
500 | if (folderID != UUID.Zero) | ||
501 | { | ||
502 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | ||
503 | containingFolder.ID = folderID; | ||
504 | containingFolder.Owner = agentID; | ||
505 | containingFolder = InventoryService.GetFolder(containingFolder); | ||
506 | version = containingFolder.Version; | ||
507 | } | ||
508 | else | ||
509 | { | ||
510 | // Lost itemsm don't really need a version | ||
511 | version = 1; | ||
512 | } | ||
513 | |||
514 | return contents; | ||
495 | 515 | ||
496 | } | 516 | } |
497 | 517 | ||