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.cs36
1 files changed, 34 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index a1991c5..0404422 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Framework.Scenes
212 } 212 }
213 } 213 }
214 214
215 private ArrayList GetScriptErrors(UUID itemID) 215 public ArrayList GetScriptErrors(UUID itemID)
216 { 216 {
217 ArrayList ret = new ArrayList(); 217 ArrayList ret = new ArrayList();
218 218
@@ -653,6 +653,7 @@ namespace OpenSim.Region.Framework.Scenes
653 item.ParentID = m_part.UUID; 653 item.ParentID = m_part.UUID;
654 item.ParentPartID = m_part.UUID; 654 item.ParentPartID = m_part.UUID;
655 item.Name = name; 655 item.Name = name;
656 item.GroupID = m_part.GroupID;
656 657
657 m_items.LockItemsForWrite(true); 658 m_items.LockItemsForWrite(true);
658 m_items.Add(item.ItemID, item); 659 m_items.Add(item.ItemID, item);
@@ -742,6 +743,12 @@ namespace OpenSim.Region.Framework.Scenes
742 item.ParentID = m_part.UUID; 743 item.ParentID = m_part.UUID;
743 item.ParentPartID = m_part.UUID; 744 item.ParentPartID = m_part.UUID;
744 item.Flags = m_items[item.ItemID].Flags; 745 item.Flags = m_items[item.ItemID].Flags;
746
747 // If group permissions have been set on, check that the groupID is up to date in case it has
748 // changed since permissions were last set.
749 if (item.GroupPermissions != (uint)PermissionMask.None)
750 item.GroupID = m_part.GroupID;
751
745 if (item.AssetID == UUID.Zero) 752 if (item.AssetID == UUID.Zero)
746 { 753 {
747 item.AssetID = m_items[item.ItemID].AssetID; 754 item.AssetID = m_items[item.ItemID].AssetID;
@@ -894,6 +901,7 @@ namespace OpenSim.Region.Framework.Scenes
894 uint everyoneMask = 0; 901 uint everyoneMask = 0;
895 uint baseMask = item.BasePermissions; 902 uint baseMask = item.BasePermissions;
896 uint ownerMask = item.CurrentPermissions; 903 uint ownerMask = item.CurrentPermissions;
904 uint groupMask = item.GroupPermissions;
897 905
898 invString.AddItemStart(); 906 invString.AddItemStart();
899 invString.AddNameValueLine("item_id", item.ItemID.ToString()); 907 invString.AddNameValueLine("item_id", item.ItemID.ToString());
@@ -903,7 +911,7 @@ namespace OpenSim.Region.Framework.Scenes
903 911
904 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); 912 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
905 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); 913 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
906 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); 914 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask));
907 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); 915 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
908 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); 916 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
909 917
@@ -1137,5 +1145,29 @@ namespace OpenSim.Region.Framework.Scenes
1137 } 1145 }
1138 return ret; 1146 return ret;
1139 } 1147 }
1148
1149 public void ResumeScripts()
1150 {
1151 IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
1152 if (engines == null)
1153 return;
1154
1155
1156 Items.LockItemsForRead(true);
1157
1158 foreach (TaskInventoryItem item in m_items.Values)
1159 {
1160 if (item.InvType == (int)InventoryType.LSL)
1161 {
1162 foreach (IScriptModule engine in engines)
1163 {
1164 if (engine != null)
1165 engine.ResumeScript(item.ItemID);
1166 }
1167 }
1168 }
1169
1170 Items.LockItemsForRead(false);
1171 }
1140 } 1172 }
1141} 1173}