Add the Current Outfit folder as an available folder in the SuitcaseInventory.

0.7.5-post-fixes
Diva Canto 2013-07-21 14:34:43 -07:00
parent f5343e4b07
commit 5e094bcd46
1 changed files with 16 additions and 0 deletions

View File

@ -472,6 +472,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
@ -510,6 +522,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;
@ -555,6 +568,9 @@ namespace OpenSim.Services.HypergridService
List<XInventoryFolder> tree = new List<XInventoryFolder>();
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;