From f43681510725f5b95fcb864a1f3e4b744fcaf992 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 7 Apr 2008 23:15:35 +0000 Subject: Refactor InventoryItemBase to do the following: * wrap fields as Properties * rename some fields/properties to more sensible names * set style to PropName to match more standard C# approach --- .../Modules/AgentAssetTransactionModule.cs | 2 +- .../Environment/Modules/AgentAssetsTransactions.cs | 36 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs index 0789b3c..7ae3eba 100644 --- a/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/AgentAssetTransactionModule.cs @@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Modules { m_log.DebugFormat( "[TRANSACTIONS MANAGER] Called HandleItemUpdateFromTransaction with item {0}", - item.inventoryName); + item.Name); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); diff --git a/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs index caba071..4d2ec5b 100644 --- a/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/AgentAssetsTransactions.cs @@ -342,7 +342,7 @@ namespace OpenSim.Region.Environment.Modules AssetBase asset = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset( - assetID, (item.assetType == (int) AssetType.Texture ? true : false)); + assetID, (item.AssetType == (int) AssetType.Texture ? true : false)); if (asset == null) { @@ -351,11 +351,11 @@ namespace OpenSim.Region.Environment.Modules if (asset != null && asset.FullID == assetID) { - asset.Name = item.inventoryName; - asset.Description = item.inventoryDescription; - asset.InvType = (sbyte) item.invType; - asset.Type = (sbyte) item.assetType; - item.assetID = asset.FullID; + asset.Name = item.Name; + asset.Description = item.Description; + asset.InvType = (sbyte) item.InvType; + asset.Type = (sbyte) item.AssetType; + item.AssetID = asset.FullID; m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset); } @@ -374,18 +374,18 @@ namespace OpenSim.Region.Environment.Modules if (userInfo != null) { InventoryItemBase item = new InventoryItemBase(); - item.avatarID = ourClient.AgentId; - item.creatorsID = ourClient.AgentId; - item.inventoryID = LLUUID.Random(); - item.assetID = Asset.FullID; - item.inventoryDescription = m_description; - item.inventoryName = m_name; - item.assetType = type; - item.invType = invType; - item.parentFolderID = InventFolder; - item.inventoryBasePermissions = 2147483647; - item.inventoryCurrentPermissions = 2147483647; - item.inventoryNextPermissions = nextPerm; + item.Owner = ourClient.AgentId; + item.Creator = ourClient.AgentId; + item.ID = LLUUID.Random(); + item.AssetID = Asset.FullID; + item.Description = m_description; + item.Name = m_name; + item.AssetType = type; + item.InvType = invType; + item.Folder = InventFolder; + item.BasePermissions = 2147483647; + item.CurrentPermissions = 2147483647; + item.NextPermissions = nextPerm; userInfo.AddItem(ourClient.AgentId, item); ourClient.SendInventoryItemCreateUpdate(item); -- cgit v1.1