aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs21
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 3ed37a2..60efc04 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -236,11 +236,8 @@ namespace OpenSim.Region.Framework.Scenes
236 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values); 236 IList<TaskInventoryItem> items = new List<TaskInventoryItem>(Items.Values);
237 foreach (TaskInventoryItem item in items) 237 foreach (TaskInventoryItem item in items)
238 { 238 {
239 if (groupID != item.GroupID)
240 {
241 item.GroupID = groupID; 239 item.GroupID = groupID;
242 } 240 }
243 }
244 m_items.LockItemsForWrite(false); 241 m_items.LockItemsForWrite(false);
245 } 242 }
246 243
@@ -982,7 +979,7 @@ namespace OpenSim.Region.Framework.Scenes
982 } 979 }
983// old code end 980// old code end
984 rootPart.TrimPermissions(); 981 rootPart.TrimPermissions();
985 group.AggregateDeepPerms(); 982 group.InvalidateDeepEffectivePerms();
986 } 983 }
987 984
988 return true; 985 return true;
@@ -1020,6 +1017,9 @@ namespace OpenSim.Region.Framework.Scenes
1020 if (item.GroupPermissions != (uint)PermissionMask.None) 1017 if (item.GroupPermissions != (uint)PermissionMask.None)
1021 item.GroupID = m_part.GroupID; 1018 item.GroupID = m_part.GroupID;
1022 1019
1020 if(item.OwnerID == UUID.Zero) // viewer to internal enconding of group owned
1021 item.OwnerID = item.GroupID;
1022
1023 if (item.AssetID == UUID.Zero) 1023 if (item.AssetID == UUID.Zero)
1024 item.AssetID = m_items[item.ItemID].AssetID; 1024 item.AssetID = m_items[item.ItemID].AssetID;
1025 1025
@@ -1031,8 +1031,7 @@ namespace OpenSim.Region.Framework.Scenes
1031 1031
1032 if (considerChanged) 1032 if (considerChanged)
1033 { 1033 {
1034 m_part.AggregateInnerPerms(); 1034 m_part.ParentGroup.InvalidateDeepEffectivePerms();
1035 m_part.ParentGroup.AggregatePerms();
1036 HasInventoryChanged = true; 1035 HasInventoryChanged = true;
1037 m_part.ParentGroup.HasGroupChanged = true; 1036 m_part.ParentGroup.HasGroupChanged = true;
1038 } 1037 }
@@ -1075,8 +1074,7 @@ namespace OpenSim.Region.Framework.Scenes
1075 m_items.Remove(itemID); 1074 m_items.Remove(itemID);
1076 m_items.LockItemsForWrite(false); 1075 m_items.LockItemsForWrite(false);
1077 1076
1078 m_part.AggregateInnerPerms(); 1077 m_part.ParentGroup.InvalidateDeepEffectivePerms();
1079 m_part.ParentGroup.AggregatePerms();
1080 1078
1081 m_inventorySerial++; 1079 m_inventorySerial++;
1082 m_part.TriggerScriptChangedEvent(Changed.INVENTORY); 1080 m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
@@ -1199,15 +1197,20 @@ namespace OpenSim.Region.Framework.Scenes
1199 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); 1197 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
1200 1198
1201 invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); 1199 invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
1202 invString.AddNameValueLine("owner_id", ownerID.ToString());
1203 1200
1204 invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); 1201 invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
1205 1202
1206 invString.AddNameValueLine("group_id",groupID.ToString()); 1203 invString.AddNameValueLine("group_id",groupID.ToString());
1207 if(groupID != UUID.Zero && ownerID == groupID) 1204 if(groupID != UUID.Zero && ownerID == groupID)
1205 {
1206 invString.AddNameValueLine("owner_id", UUID.Zero.ToString());
1208 invString.AddNameValueLine("group_owned","1"); 1207 invString.AddNameValueLine("group_owned","1");
1208 }
1209 else 1209 else
1210 {
1211 invString.AddNameValueLine("owner_id", ownerID.ToString());
1210 invString.AddNameValueLine("group_owned","0"); 1212 invString.AddNameValueLine("group_owned","0");
1213 }
1211 1214
1212 invString.AddSectionEnd(); 1215 invString.AddSectionEnd();
1213 1216