diff options
author | lbsa71 | 2007-07-03 14:37:29 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-03 14:37:29 +0000 |
commit | 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 (patch) | |
tree | 8d72120aac2184c5ed4c5ab5f6b673ef496a0803 /OpenSim/Region/ClientStack/Assets/InventoryCache.cs | |
parent | * Completed conceptual LlsdMethod - everything resides in SimpleApp pending g... (diff) | |
download | opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.zip opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.gz opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.bz2 opensim-SC-9b6b6d05d45cf0f754a0b26bf6240ef50be66563.tar.xz |
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
Diffstat (limited to 'OpenSim/Region/ClientStack/Assets/InventoryCache.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Assets/InventoryCache.cs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs index da74f85..082c0d0 100644 --- a/OpenSim/Region/ClientStack/Assets/InventoryCache.cs +++ b/OpenSim/Region/ClientStack/Assets/InventoryCache.cs | |||
@@ -28,13 +28,12 @@ | |||
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Text; | ||
31 | using libsecondlife; | 32 | using libsecondlife; |
32 | using OpenSim; | ||
33 | using libsecondlife.Packets; | 33 | using libsecondlife.Packets; |
34 | //using OpenSim.GridServers; | 34 | using OpenSim.Framework.Interfaces; |
35 | using OpenSim.Framework.Inventory; | 35 | using OpenSim.Framework.Inventory; |
36 | using OpenSim.Framework.Types; | 36 | using OpenSim.Framework.Types; |
37 | using OpenSim.Framework.Interfaces; | ||
38 | using OpenSim.Region.ClientStack; | 37 | using OpenSim.Region.ClientStack; |
39 | 38 | ||
40 | namespace OpenSim.Assets | 39 | namespace OpenSim.Assets |
@@ -46,7 +45,7 @@ namespace OpenSim.Assets | |||
46 | { | 45 | { |
47 | private Dictionary<LLUUID, AgentInventory> _agentsInventory; | 46 | private Dictionary<LLUUID, AgentInventory> _agentsInventory; |
48 | private List<UserServerRequest> _serverRequests; //list of requests made to user server. | 47 | private List<UserServerRequest> _serverRequests; //list of requests made to user server. |
49 | private System.Text.Encoding _enc = System.Text.Encoding.ASCII; | 48 | private Encoding _enc = Encoding.ASCII; |
50 | private const uint FULL_MASK_PERMISSIONS = 2147483647; | 49 | private const uint FULL_MASK_PERMISSIONS = 2147483647; |
51 | 50 | ||
52 | public InventoryCache() | 51 | public InventoryCache() |
@@ -127,7 +126,7 @@ namespace OpenSim.Assets | |||
127 | return res; | 126 | return res; |
128 | } | 127 | } |
129 | 128 | ||
130 | public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, OpenSim.Framework.Types.AssetBase asset) | 129 | public LLUUID AddNewInventoryItem(ClientView remoteClient, LLUUID folderID, AssetBase asset) |
131 | { | 130 | { |
132 | LLUUID newItem = null; | 131 | LLUUID newItem = null; |
133 | if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) | 132 | if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) |
@@ -163,7 +162,7 @@ namespace OpenSim.Assets | |||
163 | return res; | 162 | return res; |
164 | } | 163 | } |
165 | 164 | ||
166 | public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, OpenSim.Framework.Types.AssetBase asset) | 165 | public bool UpdateInventoryItemAsset(ClientView remoteClient, LLUUID itemID, AssetBase asset) |
167 | { | 166 | { |
168 | if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) | 167 | if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) |
169 | { | 168 | { |
@@ -238,7 +237,7 @@ namespace OpenSim.Assets | |||
238 | Descend.ItemData[i].SalePrice = 100; | 237 | Descend.ItemData[i].SalePrice = 100; |
239 | Descend.ItemData[i].SaleType = 0; | 238 | Descend.ItemData[i].SaleType = 0; |
240 | Descend.ItemData[i].Type = Item.Type; | 239 | Descend.ItemData[i].Type = Item.Type; |
241 | Descend.ItemData[i].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); | 240 | Descend.ItemData[i].CRC = Helpers.InventoryCRC(1000, 0, Descend.ItemData[i].InvType, Descend.ItemData[i].Type, Descend.ItemData[i].AssetID, Descend.ItemData[i].GroupID, 100, Descend.ItemData[i].OwnerID, Descend.ItemData[i].CreatorID, Descend.ItemData[i].ItemID, Descend.ItemData[i].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); |
242 | } | 241 | } |
243 | 242 | ||
244 | userInfo.OutPacket(Descend); | 243 | userInfo.OutPacket(Descend); |
@@ -286,7 +285,7 @@ namespace OpenSim.Assets | |||
286 | InventoryReply.InventoryData[0].SalePrice = 100; | 285 | InventoryReply.InventoryData[0].SalePrice = 100; |
287 | InventoryReply.InventoryData[0].SaleType = 0; | 286 | InventoryReply.InventoryData[0].SaleType = 0; |
288 | InventoryReply.InventoryData[0].Type = Item.Type; | 287 | InventoryReply.InventoryData[0].Type = Item.Type; |
289 | InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); | 288 | InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); |
290 | userInfo.OutPacket(InventoryReply); | 289 | userInfo.OutPacket(InventoryReply); |
291 | } | 290 | } |
292 | } | 291 | } |
@@ -320,7 +319,7 @@ namespace OpenSim.Assets | |||
320 | InventoryReply.InventoryData[0].SalePrice = 100; | 319 | InventoryReply.InventoryData[0].SalePrice = 100; |
321 | InventoryReply.InventoryData[0].SaleType = 0; | 320 | InventoryReply.InventoryData[0].SaleType = 0; |
322 | InventoryReply.InventoryData[0].Type = Item.Type; | 321 | InventoryReply.InventoryData[0].Type = Item.Type; |
323 | InventoryReply.InventoryData[0].CRC = libsecondlife.Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); | 322 | InventoryReply.InventoryData[0].CRC = Helpers.InventoryCRC(1000, 0, InventoryReply.InventoryData[0].InvType, InventoryReply.InventoryData[0].Type, InventoryReply.InventoryData[0].AssetID, InventoryReply.InventoryData[0].GroupID, 100, InventoryReply.InventoryData[0].OwnerID, InventoryReply.InventoryData[0].CreatorID, InventoryReply.InventoryData[0].ItemID, InventoryReply.InventoryData[0].FolderID, FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); |
324 | 323 | ||
325 | remoteClient.OutPacket(InventoryReply); | 324 | remoteClient.OutPacket(InventoryReply); |
326 | } | 325 | } |