diff options
author | Dr Scofield | 2008-11-14 13:03:18 +0000 |
---|---|---|
committer | Dr Scofield | 2008-11-14 13:03:18 +0000 |
commit | 5c21ec6d108313080ccf8bdf2212ce52ad80bbb5 (patch) | |
tree | 8d039bfe8603ce2c049a8f26f44fa121ab372afe /OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |
parent | From: Christopher Yeoh <cyeoh@au1.ibm.com> (diff) | |
download | opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.zip opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.tar.gz opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.tar.bz2 opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.tar.xz |
reverting #7295, as it still fails a test case (as pointed out very
kindly by sean) --- lesson learned: just running a "make test" is not
sufficient, you need to precede it by a "make clean".
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index fa66515..501f199 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -289,16 +289,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
289 | /// name is chosen. | 289 | /// name is chosen. |
290 | /// </summary> | 290 | /// </summary> |
291 | /// <param name="item"></param> | 291 | /// <param name="item"></param> |
292 | public void AddInventoryItem(TaskInventoryItem item, bool allowedDrop) | 292 | public void AddInventoryItem(TaskInventoryItem item) |
293 | { | 293 | { |
294 | AddInventoryItem(item.Name, item, allowedDrop); | 294 | AddInventoryItem(item.Name, item); |
295 | } | 295 | } |
296 | 296 | ||
297 | /// <summary> | 297 | /// <summary> |
298 | /// Add an item to this prim's inventory. If an item with the same name already exists, it is replaced. | 298 | /// Add an item to this prim's inventory. If an item with the same name already exists, it is replaced. |
299 | /// </summary> | 299 | /// </summary> |
300 | /// <param name="item"></param> | 300 | /// <param name="item"></param> |
301 | public void AddInventoryItemExclusive(TaskInventoryItem item, bool allowedDrop) | 301 | public void AddInventoryItemExclusive(TaskInventoryItem item) |
302 | { | 302 | { |
303 | List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values); | 303 | List<TaskInventoryItem> il = new List<TaskInventoryItem>(m_taskInventory.Values); |
304 | foreach (TaskInventoryItem i in il) | 304 | foreach (TaskInventoryItem i in il) |
@@ -313,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
316 | AddInventoryItem(item.Name, item, allowedDrop); | 316 | AddInventoryItem(item.Name, item); |
317 | } | 317 | } |
318 | 318 | ||
319 | /// <summary> | 319 | /// <summary> |
@@ -324,10 +324,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
324 | /// The item itself. The name within this structure is ignored in favour of the name | 324 | /// The item itself. The name within this structure is ignored in favour of the name |
325 | /// given in this method's arguments | 325 | /// given in this method's arguments |
326 | /// </param> | 326 | /// </param> |
327 | /// <param name="allowedDrop"> | 327 | protected void AddInventoryItem(string name, TaskInventoryItem item) |
328 | // Item was only added to inventory because AllowedDrop is set | ||
329 | /// </param> | ||
330 | protected void AddInventoryItem(string name, TaskInventoryItem item, bool allowedDrop) | ||
331 | { | 328 | { |
332 | name = FindAvailableInventoryName(name); | 329 | name = FindAvailableInventoryName(name); |
333 | if (name == String.Empty) | 330 | if (name == String.Empty) |
@@ -340,10 +337,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
340 | lock (m_taskInventory) | 337 | lock (m_taskInventory) |
341 | { | 338 | { |
342 | m_taskInventory.Add(item.ItemID, item); | 339 | m_taskInventory.Add(item.ItemID, item); |
343 | if (allowedDrop) | 340 | TriggerScriptChangedEvent(Changed.INVENTORY); |
344 | TriggerScriptChangedEvent(Changed.ALLOWED_DROP); | ||
345 | else | ||
346 | TriggerScriptChangedEvent(Changed.INVENTORY); | ||
347 | } | 341 | } |
348 | 342 | ||
349 | m_inventorySerial++; | 343 | m_inventorySerial++; |