diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 141cf66..f5b9825 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -759,14 +759,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
759 | return item; | 759 | return item; |
760 | } | 760 | } |
761 | 761 | ||
762 | /// <summary> | 762 | public TaskInventoryItem GetInventoryItem(string name) |
763 | /// Get inventory items by name. | 763 | { |
764 | /// </summary> | 764 | m_items.LockItemsForRead(true); |
765 | /// <param name="name"></param> | 765 | foreach (TaskInventoryItem item in m_items.Values) |
766 | /// <returns> | 766 | { |
767 | /// A list of inventory items with that name. | 767 | if (item.Name == name) |
768 | /// If no inventory item has that name then an empty list is returned. | 768 | { |
769 | /// </returns> | 769 | return item; |
770 | m_items.LockItemsForRead(false); | ||
771 | } | ||
772 | } | ||
773 | m_items.LockItemsForRead(false); | ||
774 | |||
775 | return null; | ||
776 | } | ||
777 | |||
770 | public List<TaskInventoryItem> GetInventoryItems(string name) | 778 | public List<TaskInventoryItem> GetInventoryItems(string name) |
771 | { | 779 | { |
772 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); | 780 | List<TaskInventoryItem> items = new List<TaskInventoryItem>(); |
@@ -1236,10 +1244,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1236 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) | 1244 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) |
1237 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; | 1245 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; |
1238 | } | 1246 | } |
1239 | item.OwnerChanged = true; | ||
1240 | item.CurrentPermissions &= item.NextPermissions; | 1247 | item.CurrentPermissions &= item.NextPermissions; |
1241 | item.BasePermissions &= item.NextPermissions; | 1248 | item.BasePermissions &= item.NextPermissions; |
1242 | item.EveryonePermissions &= item.NextPermissions; | 1249 | item.EveryonePermissions &= item.NextPermissions; |
1250 | item.OwnerChanged = true; | ||
1243 | item.PermsMask = 0; | 1251 | item.PermsMask = 0; |
1244 | item.PermsGranter = UUID.Zero; | 1252 | item.PermsGranter = UUID.Zero; |
1245 | } | 1253 | } |
@@ -1432,4 +1440,4 @@ namespace OpenSim.Region.Framework.Scenes | |||
1432 | } | 1440 | } |
1433 | } | 1441 | } |
1434 | } | 1442 | } |
1435 | } \ No newline at end of file | 1443 | } |