Add a parameter to prim inventory update to prevent event firing
parent
81ff5eaba0
commit
06661708b4
|
@ -163,6 +163,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// in this prim's inventory.</param>
|
||||
/// <returns>false if the item did not exist, true if the update occurred successfully</returns>
|
||||
bool UpdateInventoryItem(TaskInventoryItem item);
|
||||
bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents);
|
||||
|
||||
/// <summary>
|
||||
/// Remove an item from this entity's inventory
|
||||
|
|
|
@ -734,6 +734,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// in this prim's inventory.</param>
|
||||
/// <returns>false if the item did not exist, true if the update occurred successfully</returns>
|
||||
public bool UpdateInventoryItem(TaskInventoryItem item)
|
||||
{
|
||||
return UpdateInventoryItem(item, true);
|
||||
}
|
||||
|
||||
public bool UpdateInventoryItem(TaskInventoryItem item, bool fireScriptEvents)
|
||||
{
|
||||
m_items.LockItemsForWrite(true);
|
||||
|
||||
|
@ -765,6 +770,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
m_items[item.ItemID] = item;
|
||||
m_inventorySerial++;
|
||||
if (fireScriptEvents)
|
||||
m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
|
||||
HasInventoryChanged = true;
|
||||
m_part.ParentGroup.HasGroupChanged = true;
|
||||
|
|
Loading…
Reference in New Issue