From 8c80d98252f376a815e522c705a3c576dfc16f75 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 4 Feb 2007 11:36:35 +0000 Subject: Clean up --- InventoryManager.cs | 172 ++++++++++++++++++++++++++-------------------------- 1 file changed, 86 insertions(+), 86 deletions(-) (limited to 'InventoryManager.cs') diff --git a/InventoryManager.cs b/InventoryManager.cs index 72c9607..17f7f5c 100644 --- a/InventoryManager.cs +++ b/InventoryManager.cs @@ -38,20 +38,20 @@ namespace OpenSim /// public class InventoryManager { - private System.Text.Encoding enc = System.Text.Encoding.ASCII; + public Dictionary Folders; public Dictionary Items; - private Server server; - + private Server _server; + private System.Text.Encoding _enc = System.Text.Encoding.ASCII; private const uint FULL_MASK_PERMISSIONS = 2147483647; /// /// /// /// - public InventoryManager(Server serve) + public InventoryManager(Server server) { - server=serve; + _server = server; Folders=new Dictionary(); Items=new Dictionary(); } @@ -63,23 +63,23 @@ namespace OpenSim /// /// /// - public LLUUID AddToInventory(User_Agent_info UserInfo, LLUUID FolderID,AssetBase Asset) + public LLUUID AddToInventory(UserAgentInfo userInfo, LLUUID folderID, AssetBase asset) { - if(this.Folders.ContainsKey(FolderID)) + if(this.Folders.ContainsKey(folderID)) { - LLUUID NewItemID=LLUUID.Random(); + LLUUID NewItemID = LLUUID.Random(); - InventoryItem Item=new InventoryItem(); - Item.FolderID=FolderID; - Item.OwnerID=UserInfo.AgentID; - Item.AssetID=Asset.Full_ID; - Item.ItemID=NewItemID; - Item.Type=Asset.Type; - Item.Name=Asset.Name; - Item.Description=Asset.Description; - Item.InvType=Asset.InvType; - this.Items.Add(Item.ItemID,Item); - InventoryFolder Folder=Folders[Item.FolderID]; + InventoryItem Item = new InventoryItem(); + Item.FolderID = folderID; + Item.OwnerID = userInfo.AgentID; + Item.AssetID = asset.FullID; + Item.ItemID = NewItemID; + Item.Type = asset.Type; + Item.Name = asset.Name; + Item.Description = asset.Description; + Item.InvType = asset.InvType; + this.Items.Add(Item.ItemID, Item); + InventoryFolder Folder = Folders[Item.FolderID]; Folder.Items.Add(Item); return(Item.ItemID); } @@ -95,12 +95,12 @@ namespace OpenSim /// /// /// - public bool CreateNewFolder(User_Agent_info UserInfo, LLUUID NewFolder) + public bool CreateNewFolder(UserAgentInfo userInfo, LLUUID newFolder) { - InventoryFolder Folder=new InventoryFolder(); - Folder.FolderID=NewFolder; - Folder.OwnerID=UserInfo.AgentID; - this.Folders.Add(Folder.FolderID,Folder); + InventoryFolder Folder = new InventoryFolder(); + Folder.FolderID = newFolder; + Folder.OwnerID = userInfo.AgentID; + this.Folders.Add(Folder.FolderID, Folder); return(true); } @@ -110,49 +110,49 @@ namespace OpenSim /// /// /// - public void FetchInventoryDescendents(User_Agent_info User_info,FetchInventoryDescendentsPacket FetchDescend) + public void FetchInventoryDescendents(UserAgentInfo userInfo, FetchInventoryDescendentsPacket FetchDescend) { if(FetchDescend.InventoryData.FetchItems) { if(this.Folders.ContainsKey(FetchDescend.InventoryData.FolderID)) { - InventoryFolder Folder=this.Folders[FetchDescend.InventoryData.FolderID]; - InventoryDescendentsPacket Descend=new InventoryDescendentsPacket(); - Descend.AgentData.AgentID=User_info.AgentID; - Descend.AgentData.OwnerID=Folder.OwnerID; - Descend.AgentData.FolderID=FetchDescend.InventoryData.FolderID; - Descend.AgentData.Descendents=Folder.Items.Count; - Descend.AgentData.Version=Folder.Items.Count; + InventoryFolder Folder = this.Folders[FetchDescend.InventoryData.FolderID]; + InventoryDescendentsPacket Descend = new InventoryDescendentsPacket(); + Descend.AgentData.AgentID = userInfo.AgentID; + Descend.AgentData.OwnerID = Folder.OwnerID; + Descend.AgentData.FolderID = FetchDescend.InventoryData.FolderID; + Descend.AgentData.Descendents = Folder.Items.Count; + Descend.AgentData.Version = Folder.Items.Count; - Descend.ItemData=new InventoryDescendentsPacket.ItemDataBlock[Folder.Items.Count]; - for(int i=0; i /// - public void FetchInventory(User_Agent_info User_info, FetchInventoryPacket FetchItems) + public void FetchInventory(UserAgentInfo userInfo, FetchInventoryPacket FetchItems) { - for(int i=0; i(); + Items = new List(); } } @@ -228,7 +228,7 @@ namespace OpenSim public LLUUID OwnerID; public LLUUID ItemID; public LLUUID AssetID; - public LLUUID CreatorID=LLUUID.Zero; + public LLUUID CreatorID = LLUUID.Zero; public sbyte InvType; public sbyte Type; public string Name; -- cgit v1.1