aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2010-04-27 02:40:30 +0200
committerMelanie Thielker2010-04-27 02:40:30 +0200
commit06661708b4b2ed33116839ced93d43ca0f0909a0 (patch)
tree8252f5280ecadff7e98fa0620a391688dbf9d48e /OpenSim/Region/Framework/Scenes
parentMake scripted attachment states work. Finally. Also replace two monitor locks (diff)
downloadopensim-SC_OLD-06661708b4b2ed33116839ced93d43ca0f0909a0.zip
opensim-SC_OLD-06661708b4b2ed33116839ced93d43ca0f0909a0.tar.gz
opensim-SC_OLD-06661708b4b2ed33116839ced93d43ca0f0909a0.tar.bz2
opensim-SC_OLD-06661708b4b2ed33116839ced93d43ca0f0909a0.tar.xz
Add a parameter to prim inventory update to prevent event firing
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs8
1 files changed, 7 insertions, 1 deletions
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);