diff options
Diffstat (limited to 'OpenSim/Services')
-rw-r--r-- | OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 2567c8f..0601ece 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs | |||
@@ -493,6 +493,22 @@ namespace OpenSim.Services.HypergridService | |||
493 | return null; | 493 | return null; |
494 | } | 494 | } |
495 | 495 | ||
496 | private XInventoryFolder GetCurrentOutfitXFolder(UUID userID) | ||
497 | { | ||
498 | XInventoryFolder root = GetRootXFolder(userID); | ||
499 | if (root == null) | ||
500 | return null; | ||
501 | |||
502 | XInventoryFolder[] folders = m_Database.GetFolders( | ||
503 | new string[] { "agentID", "type", "parentFolderID" }, | ||
504 | new string[] { userID.ToString(), ((int)AssetType.CurrentOutfitFolder).ToString(), root.folderID.ToString() }); | ||
505 | |||
506 | if (folders.Length == 0) | ||
507 | return null; | ||
508 | |||
509 | return folders[0]; | ||
510 | } | ||
511 | |||
496 | private XInventoryFolder GetSuitcaseXFolder(UUID principalID) | 512 | private XInventoryFolder GetSuitcaseXFolder(UUID principalID) |
497 | { | 513 | { |
498 | // Warp! Root folder for travelers | 514 | // Warp! Root folder for travelers |
@@ -531,6 +547,7 @@ namespace OpenSim.Services.HypergridService | |||
531 | if (m_SuitcaseTrees.TryGetValue(principalID, out t)) | 547 | if (m_SuitcaseTrees.TryGetValue(principalID, out t)) |
532 | return t; | 548 | return t; |
533 | 549 | ||
550 | // Get the tree of the suitcase folder | ||
534 | t = GetFolderTreeRecursive(folder); | 551 | t = GetFolderTreeRecursive(folder); |
535 | m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes | 552 | m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes |
536 | return t; | 553 | return t; |
@@ -577,6 +594,9 @@ namespace OpenSim.Services.HypergridService | |||
577 | List<XInventoryFolder> tree = new List<XInventoryFolder>(); | 594 | List<XInventoryFolder> tree = new List<XInventoryFolder>(); |
578 | tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder | 595 | tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder |
579 | tree.AddRange(GetFolderTree(principalID, suitcase.folderID)); | 596 | tree.AddRange(GetFolderTree(principalID, suitcase.folderID)); |
597 | // Also add the Current Outfit folder to the list of available folders | ||
598 | tree.Add(GetCurrentOutfitXFolder(principalID)); | ||
599 | |||
580 | XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) | 600 | XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) |
581 | { | 601 | { |
582 | if (fl.folderID == folderID) return true; | 602 | if (fl.folderID == folderID) return true; |