aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.RegionServer/Assets/InventoryCache.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.RegionServer/Assets/InventoryCache.cs27
1 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim.RegionServer/Assets/InventoryCache.cs b/OpenSim.RegionServer/Assets/InventoryCache.cs
index e4d0a90..9e73fe5 100644
--- a/OpenSim.RegionServer/Assets/InventoryCache.cs
+++ b/OpenSim.RegionServer/Assets/InventoryCache.cs
@@ -65,14 +65,20 @@ namespace OpenSim.Assets
65 } 65 }
66 66
67 } 67 }
68
68 public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID) 69 public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID)
69 { 70 {
71 return this.CreateNewInventoryFolder(remoteClient, folderID, 0);
72 }
73
74 public bool CreateNewInventoryFolder(SimClient remoteClient, LLUUID folderID, ushort type)
75 {
70 bool res = false; 76 bool res = false;
71 if (folderID != LLUUID.Zero) //don't create a folder with a zero id 77 if (folderID != LLUUID.Zero) //don't create a folder with a zero id
72 { 78 {
73 if (this._agentsInventory.ContainsKey(remoteClient.AgentID)) 79 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
74 { 80 {
75 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID); 81 res = this._agentsInventory[remoteClient.AgentID].CreateNewFolder(folderID, type);
76 } 82 }
77 } 83 }
78 return res; 84 return res;
@@ -94,6 +100,22 @@ namespace OpenSim.Assets
94 return newItem; 100 return newItem;
95 } 101 }
96 102
103 public bool UpdateInventoryItem(SimClient remoteClient, LLUUID itemID, OpenSim.Framework.Assets.AssetBase asset)
104 {
105 if (this._agentsInventory.ContainsKey(remoteClient.AgentID))
106 {
107 bool res = _agentsInventory[remoteClient.AgentID].UpdateItem(itemID, asset);
108 if (res)
109 {
110 InventoryItem Item = this._agentsInventory[remoteClient.AgentID].InventoryItems[itemID];
111 this.SendItemUpdateCreate(remoteClient, Item);
112 }
113 return res;
114 }
115
116 return false;
117 }
118
97 public void FetchInventoryDescendents(SimClient userInfo, FetchInventoryDescendentsPacket FetchDescend) 119 public void FetchInventoryDescendents(SimClient userInfo, FetchInventoryDescendentsPacket FetchDescend)
98 { 120 {
99 if (this._agentsInventory.ContainsKey(userInfo.AgentID)) 121 if (this._agentsInventory.ContainsKey(userInfo.AgentID))
@@ -190,6 +212,7 @@ namespace OpenSim.Assets
190 } 212 }
191 } 213 }
192 } 214 }
215
193 private void SendItemUpdateCreate(SimClient remoteClient, InventoryItem Item) 216 private void SendItemUpdateCreate(SimClient remoteClient, InventoryItem Item)
194 { 217 {
195 218
@@ -223,7 +246,7 @@ namespace OpenSim.Assets
223 } 246 }
224 } 247 }
225 248
226 249
227 250
228 public class UserServerRequest 251 public class UserServerRequest
229 { 252 {