diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index bb9f457..64da5f6 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -125,13 +125,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
125 | 125 | ||
126 | return false; | 126 | return false; |
127 | } | 127 | } |
128 | } | ||
129 | |||
130 | public bool AddInventoryItem(InventoryItemBase item) | ||
131 | { | ||
132 | return AddInventoryItem(item, true); | ||
128 | } | 133 | } |
129 | 134 | ||
130 | /// <summary> | 135 | /// <summary> |
131 | /// Add the given inventory item to a user's inventory. | 136 | /// Add the given inventory item to a user's inventory. |
132 | /// </summary> | 137 | /// </summary> |
133 | /// <param name="item"></param> | 138 | /// <param name="item"></param> |
134 | public bool AddInventoryItem(InventoryItemBase item) | 139 | public bool AddInventoryItem(InventoryItemBase item, bool trigger) |
135 | { | 140 | { |
136 | if (item.Folder != UUID.Zero && InventoryService.AddItem(item)) | 141 | if (item.Folder != UUID.Zero && InventoryService.AddItem(item)) |
137 | { | 142 | { |
@@ -140,7 +145,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | { | 145 | { |
141 | userlevel = 1; | 146 | userlevel = 1; |
142 | } | 147 | } |
143 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel); | 148 | if (trigger) |
149 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel); | ||
144 | 150 | ||
145 | return true; | 151 | return true; |
146 | } | 152 | } |
@@ -179,7 +185,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
179 | { | 185 | { |
180 | userlevel = 1; | 186 | userlevel = 1; |
181 | } | 187 | } |
182 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel); | 188 | if (trigger) |
189 | EventManager.TriggerOnNewInventoryItemUploadComplete(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel); | ||
183 | 190 | ||
184 | if (originalFolder != UUID.Zero) | 191 | if (originalFolder != UUID.Zero) |
185 | { | 192 | { |
@@ -751,7 +758,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
751 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); | 758 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); |
752 | if (invAccess != null) | 759 | if (invAccess != null) |
753 | invAccess.TransferInventoryAssets(itemCopy, senderId, recipient); | 760 | invAccess.TransferInventoryAssets(itemCopy, senderId, recipient); |
754 | AddInventoryItem(itemCopy); | 761 | AddInventoryItem(itemCopy, false); |
755 | 762 | ||
756 | if (!Permissions.BypassPermissions()) | 763 | if (!Permissions.BypassPermissions()) |
757 | { | 764 | { |