Fixed so Inventory structure is correct after a log out and re-login (in Sandbox accounts)

This commit is contained in:
MW
2007-03-29 17:04:24 +00:00
parent 546d9dfdc5
commit f673b73471
4 changed files with 25 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;