diff options
author | Melanie Thielker | 2010-04-27 02:40:30 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-04-27 02:40:30 +0200 |
commit | 06661708b4b2ed33116839ced93d43ca0f0909a0 (patch) | |
tree | 8252f5280ecadff7e98fa0620a391688dbf9d48e /OpenSim/Region/Framework | |
parent | Make scripted attachment states work. Finally. Also replace two monitor locks (diff) | |
download | opensim-SC-06661708b4b2ed33116839ced93d43ca0f0909a0.zip opensim-SC-06661708b4b2ed33116839ced93d43ca0f0909a0.tar.gz opensim-SC-06661708b4b2ed33116839ced93d43ca0f0909a0.tar.bz2 opensim-SC-06661708b4b2ed33116839ced93d43ca0f0909a0.tar.xz |
Add a parameter to prim inventory update to prevent event firing
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 8 |
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); |