From f673b73471dd450881006a5281c15b4b70c96b2d Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 29 Mar 2007 17:04:24 +0000 Subject: Fixed so Inventory structure is correct after a log out and re-login (in Sandbox accounts) --- OpenSim.Framework/AgentInventory.cs | 3 ++- OpenSim.Framework/UserProfileManager.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim.Framework') diff --git a/OpenSim.Framework/AgentInventory.cs b/OpenSim.Framework/AgentInventory.cs index 1abf59a..8032455 100644 --- a/OpenSim.Framework/AgentInventory.cs +++ b/OpenSim.Framework/AgentInventory.cs @@ -33,7 +33,7 @@ namespace OpenSim.Framework.Inventory InventoryRoot = new InventoryFolder(); InventoryRoot.FolderID = LLUUID.Random(); - InventoryRoot.ParentID = new LLUUID(); + InventoryRoot.ParentID = LLUUID.Zero; InventoryRoot.Version = 1; InventoryRoot.DefaultType = 8; InventoryRoot.OwnerID = this.AgentID; @@ -84,6 +84,7 @@ namespace OpenSim.Framework.Inventory public bool CreateNewFolder(LLUUID folderID, ushort type, string folderName, LLUUID parent) { + Console.WriteLine("creating new folder called " + folderName + " in agents inventory"); InventoryFolder Folder = new InventoryFolder(); Folder.FolderID = folderID; Folder.OwnerID = this.AgentID; diff --git a/OpenSim.Framework/UserProfileManager.cs b/OpenSim.Framework/UserProfileManager.cs index ef5ab71..2f99494 100644 --- a/OpenSim.Framework/UserProfileManager.cs +++ b/OpenSim.Framework/UserProfileManager.cs @@ -287,9 +287,11 @@ namespace OpenSim.Framework.User ClassifiedCategories.Add(ClassifiedCategoriesHash); ArrayList AgentInventory = new ArrayList(); + Console.WriteLine("adding inventory to response"); foreach (InventoryFolder InvFolder in TheUser.Inventory.InventoryFolders.Values) { Hashtable TempHash = new Hashtable(); + Console.WriteLine("adding folder " + InvFolder.FolderName + ", ID: " + InvFolder.FolderID.ToStringHyphenated() + " with parent: " + InvFolder.ParentID.ToStringHyphenated()); TempHash["name"] = InvFolder.FolderName; TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); TempHash["version"] = (Int32)InvFolder.Version; -- cgit v1.1