diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 9359aea..c88dda6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -979,54 +979,55 @@ namespace OpenSim.Region.Framework.Scenes | |||
979 | if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId)) | 979 | if (m_part.ParentGroup.Scene.Permissions.CanEditObjectInventory(m_part.UUID, client.AgentId)) |
980 | includeAssets = true; | 980 | includeAssets = true; |
981 | 981 | ||
982 | m_items.LockItemsForRead(true); | 982 | lock (m_items) |
983 | |||
984 | foreach (TaskInventoryItem item in m_items.Values) | ||
985 | { | 983 | { |
986 | UUID ownerID = item.OwnerID; | 984 | foreach (TaskInventoryItem item in m_items.Values) |
987 | uint everyoneMask = 0; | 985 | { |
988 | uint baseMask = item.BasePermissions; | 986 | UUID ownerID = item.OwnerID; |
989 | uint ownerMask = item.CurrentPermissions; | 987 | uint everyoneMask = 0; |
990 | uint groupMask = item.GroupPermissions; | 988 | uint baseMask = item.BasePermissions; |
991 | 989 | uint ownerMask = item.CurrentPermissions; | |
992 | invString.AddItemStart(); | 990 | uint groupMask = item.GroupPermissions; |
993 | invString.AddNameValueLine("item_id", item.ItemID.ToString()); | 991 | |
994 | invString.AddNameValueLine("parent_id", m_part.UUID.ToString()); | 992 | invString.AddItemStart(); |
995 | 993 | invString.AddNameValueLine("item_id", item.ItemID.ToString()); | |
996 | invString.AddPermissionsStart(); | 994 | invString.AddNameValueLine("parent_id", m_part.UUID.ToString()); |
997 | 995 | ||
998 | invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); | 996 | invString.AddPermissionsStart(); |
999 | invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); | 997 | |
1000 | invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask)); | 998 | invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); |
1001 | invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); | 999 | invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); |
1002 | invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); | 1000 | invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask)); |
1003 | 1001 | invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); | |
1004 | invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); | 1002 | invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); |
1005 | invString.AddNameValueLine("owner_id", ownerID.ToString()); | 1003 | |
1006 | 1004 | invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); | |
1007 | invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); | 1005 | invString.AddNameValueLine("owner_id", ownerID.ToString()); |
1008 | 1006 | ||
1009 | invString.AddNameValueLine("group_id", item.GroupID.ToString()); | 1007 | invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); |
1010 | invString.AddSectionEnd(); | 1008 | |
1011 | 1009 | invString.AddNameValueLine("group_id", item.GroupID.ToString()); | |
1012 | if (includeAssets) | 1010 | invString.AddSectionEnd(); |
1013 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); | 1011 | |
1014 | else | 1012 | if (includeAssets) |
1015 | invString.AddNameValueLine("asset_id", UUID.Zero.ToString()); | 1013 | invString.AddNameValueLine("asset_id", item.AssetID.ToString()); |
1016 | invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); | 1014 | else |
1017 | invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); | 1015 | invString.AddNameValueLine("asset_id", UUID.Zero.ToString()); |
1018 | invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); | 1016 | invString.AddNameValueLine("type", TaskInventoryItem.Types[item.Type]); |
1019 | 1017 | invString.AddNameValueLine("inv_type", TaskInventoryItem.InvTypes[item.InvType]); | |
1020 | invString.AddSaleStart(); | 1018 | invString.AddNameValueLine("flags", Utils.UIntToHexString(item.Flags)); |
1021 | invString.AddNameValueLine("sale_type", "not"); | 1019 | |
1022 | invString.AddNameValueLine("sale_price", "0"); | 1020 | invString.AddSaleStart(); |
1023 | invString.AddSectionEnd(); | 1021 | invString.AddNameValueLine("sale_type", "not"); |
1024 | 1022 | invString.AddNameValueLine("sale_price", "0"); | |
1025 | invString.AddNameValueLine("name", item.Name + "|"); | 1023 | invString.AddSectionEnd(); |
1026 | invString.AddNameValueLine("desc", item.Description + "|"); | 1024 | |
1027 | 1025 | invString.AddNameValueLine("name", item.Name + "|"); | |
1028 | invString.AddNameValueLine("creation_date", item.CreationDate.ToString()); | 1026 | invString.AddNameValueLine("desc", item.Description + "|"); |
1029 | invString.AddSectionEnd(); | 1027 | |
1028 | invString.AddNameValueLine("creation_date", item.CreationDate.ToString()); | ||
1029 | invString.AddSectionEnd(); | ||
1030 | } | ||
1030 | } | 1031 | } |
1031 | int count = m_items.Count; | 1032 | int count = m_items.Count; |
1032 | m_items.LockItemsForRead(false); | 1033 | m_items.LockItemsForRead(false); |