aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityInventory.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs8
2 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
index d893890..1e2f60b 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs
@@ -163,6 +163,7 @@ namespace OpenSim.Region.Framework.Interfaces
163 /// in this prim's inventory.</param> 163 /// in this prim's inventory.</param>
164 /// <returns>false if the item did not exist, true if the update occurred successfully</returns> 164 /// <returns>false if the item did not exist, true if the update occurred successfully</returns>
165 bool UpdateInventoryItem(TaskInventoryItem item); 165 bool UpdateInventoryItem(TaskInventoryItem item);
166 bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents);
166 167
167 /// <summary> 168 /// <summary>
168 /// Remove an item from this entity's inventory 169 /// Remove an item from this entity's inventory
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index f875224..bc3225a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -735,6 +735,11 @@ namespace OpenSim.Region.Framework.Scenes
735 /// <returns>false if the item did not exist, true if the update occurred successfully</returns> 735 /// <returns>false if the item did not exist, true if the update occurred successfully</returns>
736 public bool UpdateInventoryItem(TaskInventoryItem item) 736 public bool UpdateInventoryItem(TaskInventoryItem item)
737 { 737 {
738 return UpdateInventoryItem(item, true);
739 }
740
741 public bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents)
742 {
738 m_items.LockItemsForWrite(true); 743 m_items.LockItemsForWrite(true);
739 744
740 if (m_items.ContainsKey(item.ItemID)) 745 if (m_items.ContainsKey(item.ItemID))
@@ -765,7 +770,8 @@ namespace OpenSim.Region.Framework.Scenes
765 770
766 m_items[item.ItemID] = item; 771 m_items[item.ItemID] = item;
767 m_inventorySerial++; 772 m_inventorySerial++;
768 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 773 if (fireScriptEvents)
774 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
769 HasInventoryChanged = true; 775 HasInventoryChanged = true;
770 m_part.ParentGroup.HasGroupChanged = true; 776 m_part.ParentGroup.HasGroupChanged = true;
771 m_items.LockItemsForWrite(false); 777 m_items.LockItemsForWrite(false);