aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/AgentInventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim.Framework/AgentInventory.cs')
-rw-r--r--OpenSim.Framework/AgentInventory.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim.Framework/AgentInventory.cs b/OpenSim.Framework/AgentInventory.cs
index f1f5847..5c57020 100644
--- a/OpenSim.Framework/AgentInventory.cs
+++ b/OpenSim.Framework/AgentInventory.cs
@@ -157,6 +157,27 @@ namespace OpenSim.Framework.Inventory
157 return (null); 157 return (null);
158 } 158 }
159 } 159 }
160
161 public bool DeleteFromInventory(LLUUID itemID)
162 {
163 bool res = false;
164 if (this.InventoryItems.ContainsKey(itemID))
165 {
166 InventoryItem item = this.InventoryItems[itemID];
167 this.InventoryItems.Remove(itemID);
168 foreach (InventoryFolder fold in InventoryFolders.Values)
169 {
170 if (fold.Items.Contains(item))
171 {
172 fold.Items.Remove(item);
173 break;
174 }
175 }
176 res = true;
177
178 }
179 return res;
180 }
160 } 181 }
161 182
162 public class InventoryFolder 183 public class InventoryFolder