From 7c566dca5a41cd3a9cb0336b00bdf7d63e24d2e9 Mon Sep 17 00:00:00 2001 From: Mandarinka Tasty Date: Sun, 4 Dec 2016 07:10:13 +0100 Subject: The new Constant: integer OBJECT_REZZER_KEY = 32; Signed-off-by: Mandarinka Tasty Signed-off-by: UbitUmarov --- .../Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 2 ++ .../Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 1 + .../Framework/InventoryAccess/InventoryAccessModule.cs | 2 ++ OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 ++ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 1 + OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 6 ++++++ OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 10 +++++++++- .../Framework/Scenes/Serialization/SceneObjectSerializer.cs | 9 +++++++++ .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++++ .../Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | 1 + 10 files changed, 39 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 2481d11..032104d 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -1046,6 +1046,7 @@ namespace OpenSim.Region.ClientStack.Linden prim.OwnerID = owner_id; prim.GroupID = UUID.Zero; prim.LastOwnerID = creatorID; + prim.RezzerID = creatorID; prim.CreationDate = Util.UnixTimeSinceEpoch(); if (grp == null) @@ -1093,6 +1094,7 @@ namespace OpenSim.Region.ClientStack.Linden { grp = new SceneObjectGroup(prim); grp.LastOwnerID = creatorID; + grp.RezzerID = creatorID; } else grp.AddPart(prim); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 769fe28..713125c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs @@ -284,6 +284,7 @@ namespace OpenSim.Region.ClientStack.Linden prim.OwnerID = AgentId; prim.GroupID = obj.GroupID; prim.LastOwnerID = prim.OwnerID; + prim.RezzerID = AgentId; prim.CreationDate = Util.UnixTimeSinceEpoch(); prim.Name = obj.Name; prim.Description = ""; diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index fa7803f..771e5fe 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -981,6 +981,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess // Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset. part.LastOwnerID = part.OwnerID; part.OwnerID = remoteClient.AgentId; + part.RezzerID = remoteClient.AgentId; } } @@ -1150,6 +1151,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess part.LastOwnerID = part.OwnerID; part.OwnerID = item.Owner; + part.RezzerID = item.Owner; part.Inventory.ChangeInventoryOwner(item.Owner); } diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 339fc15..daf7741 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2625,6 +2625,8 @@ namespace OpenSim.Region.Framework.Scenes } group.FromPartID = sourcePart.UUID; + group.RezzerID = group.FromPartID; + if( i == 0) AddNewSceneObject(group, true, curpos, rot, vel); else diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index f5f83ca..579874a 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1942,6 +1942,7 @@ namespace OpenSim.Region.Framework.Scenes else { part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID; + part.RezzerID = part.ParentGroup.RootPart.RezzerID; childParts.Add(part); } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6cdbac5..fcbcc3f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -886,6 +886,12 @@ namespace OpenSim.Region.Framework.Scenes set { m_rootPart.LastOwnerID = value; } } + public UUID RezzerID + { + get { return m_rootPart.RezzerID; } + set { m_rootPart.RezzerID = value; } + } + public UUID OwnerID { get { return m_rootPart.OwnerID; } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 3a06e7d..b95b5be 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -460,7 +460,7 @@ namespace OpenSim.Region.Framework.Scenes m_name = "Object"; CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed); - LastOwnerID = CreatorID = OwnerID = ownerID; + RezzerID = LastOwnerID = CreatorID = OwnerID = ownerID; UUID = UUID.Random(); Shape = shape; OwnershipCost = 0; @@ -484,6 +484,7 @@ namespace OpenSim.Region.Framework.Scenes #region XML Schema + private UUID _rezzerID; private UUID _lastOwnerID; private UUID _ownerID; private UUID _groupID; @@ -1385,6 +1386,12 @@ namespace OpenSim.Region.Framework.Scenes set { _lastOwnerID = value; } } + public UUID RezzerID + { + get { return _rezzerID; } + set { _rezzerID = value; } + } + public uint BaseMask { get { return _baseMask; } @@ -2222,6 +2229,7 @@ namespace OpenSim.Region.Framework.Scenes // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. dupe.LastOwnerID = OwnerID; + dupe.RezzerID = RezzerID; byte[] extraP = new byte[Shape.ExtraParams.Length]; Array.Copy(Shape.ExtraParams, extraP, extraP.Length); diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 7d3a168..0b7379b 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs @@ -428,6 +428,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization m_SOPXmlProcessors.Add("GroupID", ProcessGroupID); m_SOPXmlProcessors.Add("OwnerID", ProcessOwnerID); m_SOPXmlProcessors.Add("LastOwnerID", ProcessLastOwnerID); + m_SOPXmlProcessors.Add("RezzerID", ProcessRezzerID); m_SOPXmlProcessors.Add("BaseMask", ProcessBaseMask); m_SOPXmlProcessors.Add("OwnerMask", ProcessOwnerMask); m_SOPXmlProcessors.Add("GroupMask", ProcessGroupMask); @@ -864,6 +865,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); } + private static void ProcessRezzerID(SceneObjectPart obj, XmlReader reader) + { + obj.RezzerID = Util.ReadUUID(reader, "RezzerID"); + } + private static void ProcessBaseMask(SceneObjectPart obj, XmlReader reader) { obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); @@ -1452,6 +1458,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.LastOwnerID; WriteUUID(writer, "LastOwnerID", lastOwnerID, options); + UUID rezzerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.RezzerID; + WriteUUID(writer, "RezzerID", rezzerID, options); + writer.WriteElementString("BaseMask", sop.BaseMask.ToString()); writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString()); writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 763106f..71e8ca9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -13793,6 +13793,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } catch { }; ret.Add(new LSL_Integer(invcount)); break; + case ScriptBaseClass.OBJECT_REZZER_KEY: + ret.Add(new LSL_Key(id)); + break; case ScriptBaseClass.OBJECT_GROUP_TAG: ret.Add(new LSL_String(av.Grouptitle)); break; @@ -13988,6 +13991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api count += parts[i].Inventory.Count; ret.Add(new LSL_Integer(count)); break; + case ScriptBaseClass.OBJECT_REZZER_KEY: + ret.Add(new LSL_Key(obj.ParentGroup.RezzerID.ToString())); + break; case ScriptBaseClass.OBJECT_GROUP_TAG: ret.Add(new LSL_String(String.Empty)); break; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 48afcc0..734d878 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs @@ -640,6 +640,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase public const int OBJECT_OMEGA = 29; public const int OBJECT_PRIM_COUNT = 30; public const int OBJECT_TOTAL_INVENTORY_COUNT = 31; + public const int OBJECT_REZZER_KEY = 32; public const int OBJECT_GROUP_TAG = 33; public const int OBJECT_TEMP_ATTACHED = 34; -- cgit v1.1