aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
diff options
context:
space:
mode:
authorDiva Canto2013-07-21 14:34:43 -0700
committerDiva Canto2013-07-21 15:42:05 -0700
commitf81e289a1bc28b85d5e05a8549f9796f72d454ac (patch)
tree0444a119d7a6c10a69263061a0029ad14ae103e0 /OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
parentMinor cosmetic changes. (diff)
downloadopensim-SC_OLD-f81e289a1bc28b85d5e05a8549f9796f72d454ac.zip
opensim-SC_OLD-f81e289a1bc28b85d5e05a8549f9796f72d454ac.tar.gz
opensim-SC_OLD-f81e289a1bc28b85d5e05a8549f9796f72d454ac.tar.bz2
opensim-SC_OLD-f81e289a1bc28b85d5e05a8549f9796f72d454ac.tar.xz
Add the Current Outfit folder as an available folder in the SuitcaseInventory.
Diffstat (limited to 'OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs')
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 2567c8f..06c5b89 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -493,6 +493,18 @@ namespace OpenSim.Services.HypergridService
493 return null; 493 return null;
494 } 494 }
495 495
496 private XInventoryFolder GetCurrentOutfitXFolder(UUID userID)
497 {
498 XInventoryFolder[] folders = m_Database.GetFolders(
499 new string[] { "agentID", "type" },
500 new string[] { userID.ToString(), ((int)AssetType.CurrentOutfitFolder).ToString() });
501
502 if (folders.Length == 0)
503 return null;
504
505 return folders[0];
506 }
507
496 private XInventoryFolder GetSuitcaseXFolder(UUID principalID) 508 private XInventoryFolder GetSuitcaseXFolder(UUID principalID)
497 { 509 {
498 // Warp! Root folder for travelers 510 // Warp! Root folder for travelers
@@ -531,6 +543,7 @@ namespace OpenSim.Services.HypergridService
531 if (m_SuitcaseTrees.TryGetValue(principalID, out t)) 543 if (m_SuitcaseTrees.TryGetValue(principalID, out t))
532 return t; 544 return t;
533 545
546 // Get the tree of the suitcase folder
534 t = GetFolderTreeRecursive(folder); 547 t = GetFolderTreeRecursive(folder);
535 m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes 548 m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes
536 return t; 549 return t;
@@ -577,6 +590,9 @@ namespace OpenSim.Services.HypergridService
577 List<XInventoryFolder> tree = new List<XInventoryFolder>(); 590 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 591 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)); 592 tree.AddRange(GetFolderTree(principalID, suitcase.folderID));
593 // Also add the Current Outfit folder to the list of available folders
594 tree.Add(GetCurrentOutfitXFolder(principalID));
595
580 XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) 596 XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl)
581 { 597 {
582 if (fl.folderID == folderID) return true; 598 if (fl.folderID == folderID) return true;