From 8143c597fc5f62ec0d931d2d5b887730e06aec04 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Sep 2007 13:25:45 +0000 Subject: * Tleiades grid mode inventory (#444) - thanx Tleiades! * updated to rev 1413 on libsecondlife.dll and libsecondlife.dll.config (#423) --- .../Communications/Local/CommunicationsLocal.cs | 2 +- .../Communications/Local/LocalInventoryService.cs | 3 +- .../Communications/Local/LocalLoginService.cs | 51 +--------------------- .../Communications/Local/LocalUserServices.cs | 5 ++- 4 files changed, 8 insertions(+), 53 deletions(-) (limited to 'OpenSim/Region/Communications/Local') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index a00b35f..7e08297 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -107,7 +107,7 @@ namespace OpenSim.Region.Communications.Local } else { - this.m_inventoryService.CreateNewUserInventory(userProf.UUID); + this.m_inventoryService.CreateNewUserInventory(LLUUID.Zero, userProf.UUID); Console.WriteLine("Created new inventory set for " + firstName + " " + lastName); return userProf.UUID; } diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 53f6ffa..5bd3277 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -3,6 +3,7 @@ using libsecondlife; using OpenSim.Framework.Communications; using OpenSim.Framework.Data; using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder; +using InventoryCategory = OpenSim.Framework.Data.InventoryCategory; namespace OpenSim.Region.Communications.Local { @@ -49,7 +50,7 @@ namespace OpenSim.Region.Communications.Local } } - public override void AddNewInventoryFolder(LLUUID userID, InventoryFolder folder) + public override void AddNewInventoryFolder(LLUUID userID, InventoryFolderBase folder) { this.AddFolder(folder); } diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index ab8e397..95fdf5a 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -7,7 +7,6 @@ using OpenSim.Framework.Data; using OpenSim.Framework.Types; using OpenSim.Framework.UserManagement; using OpenSim.Framework.Utilities; -using OpenSim.Framework.Inventory; namespace OpenSim.Region.Communications.Local { @@ -25,7 +24,7 @@ namespace OpenSim.Region.Communications.Local public event LoginToRegionEvent OnLoginToRegion; public LocalLoginService(UserManagerBase userManager, string welcomeMess, CommunicationsLocal parent, NetworkServersInfo serversInfo, bool authenticate) - : base(userManager, welcomeMess) + : base(userManager, parent.InventoryService, welcomeMess) { m_Parent = parent; this.serversInfo = serversInfo; @@ -53,7 +52,7 @@ namespace OpenSim.Region.Communications.Local profile = this.m_userManager.GetUserProfile(firstname, lastname); if (profile != null) { - m_Parent.InventoryService.CreateNewUserInventory(profile.UUID); + m_Parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID); } return profile; @@ -123,51 +122,5 @@ namespace OpenSim.Region.Communications.Local } } - - protected override InventoryData CreateInventoryData(LLUUID userID) - { - List folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); - if (folders.Count > 0) - { - LLUUID rootID = LLUUID.Zero; - ArrayList AgentInventoryArray = new ArrayList(); - Hashtable TempHash; - foreach (InventoryFolderBase InvFolder in folders) - { - if (InvFolder.parentID == LLUUID.Zero) - { - rootID = InvFolder.folderID; - } - TempHash = new Hashtable(); - TempHash["name"] = InvFolder.name; - TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated(); - TempHash["version"] = (Int32)InvFolder.version; - TempHash["type_default"] = (Int32)InvFolder.type; - TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated(); - AgentInventoryArray.Add(TempHash); - } - return new InventoryData(AgentInventoryArray, rootID); - } - else - { - AgentInventory userInventory = new AgentInventory(); - userInventory.CreateRootFolder(userID, false); - - ArrayList AgentInventoryArray = new ArrayList(); - Hashtable TempHash; - foreach (OpenSim.Framework.Inventory.InventoryFolder InvFolder in userInventory.InventoryFolders.Values) - { - TempHash = new Hashtable(); - TempHash["name"] = InvFolder.FolderName; - TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); - TempHash["version"] = (Int32)InvFolder.Version; - TempHash["type_default"] = (Int32)InvFolder.DefaultType; - TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); - AgentInventoryArray.Add(TempHash); - } - - return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); - } - } } } diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 3bc4301..61b8633 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -1,4 +1,5 @@ using System; +using libsecondlife; using OpenSim.Framework.Communications; using OpenSim.Framework.Data; using OpenSim.Framework.Types; @@ -48,10 +49,10 @@ namespace OpenSim.Region.Communications.Local } else { - m_parent.InventoryService.CreateNewUserInventory(profile.UUID); + m_parent.InventoryService.CreateNewUserInventory(LLUUID.Zero, profile.UUID); } return profile; } } -} \ No newline at end of file +} -- cgit v1.1