From cab3e9978bdfefacbeddc7a99a158c1bb6ff22a5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 21 Jul 2013 14:34:43 -0700 Subject: [PATCH] Add the Current Outfit folder as an available folder in the SuitcaseInventory. --- .../HGSuitcaseInventoryService.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs index 2567c8f799..06c5b894dd 100644 --- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs @@ -493,6 +493,18 @@ namespace OpenSim.Services.HypergridService return null; } + private XInventoryFolder GetCurrentOutfitXFolder(UUID userID) + { + XInventoryFolder[] folders = m_Database.GetFolders( + new string[] { "agentID", "type" }, + new string[] { userID.ToString(), ((int)AssetType.CurrentOutfitFolder).ToString() }); + + if (folders.Length == 0) + return null; + + return folders[0]; + } + private XInventoryFolder GetSuitcaseXFolder(UUID principalID) { // Warp! Root folder for travelers @@ -531,6 +543,7 @@ namespace OpenSim.Services.HypergridService if (m_SuitcaseTrees.TryGetValue(principalID, out t)) return t; + // Get the tree of the suitcase folder t = GetFolderTreeRecursive(folder); m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes return t; @@ -577,6 +590,9 @@ namespace OpenSim.Services.HypergridService List tree = new List(); tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder tree.AddRange(GetFolderTree(principalID, suitcase.folderID)); + // Also add the Current Outfit folder to the list of available folders + tree.Add(GetCurrentOutfitXFolder(principalID)); + XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) { if (fl.folderID == folderID) return true;