The new Constant: integer OBJECT_REZZER_KEY = 32;

Signed-off-by: Mandarinka Tasty <mandarinka.tasty@gmail.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
melanie
Mandarinka Tasty 2016-12-04 07:10:13 +01:00 committed by UbitUmarov
parent fcd1e36ed6
commit 7c566dca5a
15 changed files with 76 additions and 3 deletions

View File

@ -167,7 +167,7 @@ namespace OpenSim.Data.MySQL
"SitTargetOrientY, SitTargetOrientZ, " + "SitTargetOrientY, SitTargetOrientZ, " +
"RegionUUID, CreatorID, " + "RegionUUID, CreatorID, " +
"OwnerID, GroupID, " + "OwnerID, GroupID, " +
"LastOwnerID, SceneGroupID, " + "LastOwnerID, RezzerID, SceneGroupID, " +
"PayPrice, PayButton1, " + "PayPrice, PayButton1, " +
"PayButton2, PayButton3, " + "PayButton2, PayButton3, " +
"PayButton4, LoopedSound, " + "PayButton4, LoopedSound, " +
@ -207,7 +207,7 @@ namespace OpenSim.Data.MySQL
"?SitTargetOrientW, ?SitTargetOrientX, " + "?SitTargetOrientW, ?SitTargetOrientX, " +
"?SitTargetOrientY, ?SitTargetOrientZ, " + "?SitTargetOrientY, ?SitTargetOrientZ, " +
"?RegionUUID, ?CreatorID, ?OwnerID, " + "?RegionUUID, ?CreatorID, ?OwnerID, " +
"?GroupID, ?LastOwnerID, ?SceneGroupID, " + "?GroupID, ?LastOwnerID, ?RezzerID, ?SceneGroupID, " +
"?PayPrice, ?PayButton1, ?PayButton2, " + "?PayPrice, ?PayButton1, ?PayButton2, " +
"?PayButton3, ?PayButton4, ?LoopedSound, " + "?PayButton3, ?PayButton4, ?LoopedSound, " +
"?LoopedSoundGain, ?TextureAnimation, " + "?LoopedSoundGain, ?TextureAnimation, " +
@ -1279,6 +1279,10 @@ namespace OpenSim.Data.MySQL
prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); prim.OwnerID = DBGuid.FromDB(row["OwnerID"]);
prim.GroupID = DBGuid.FromDB(row["GroupID"]); prim.GroupID = DBGuid.FromDB(row["GroupID"]);
prim.LastOwnerID = DBGuid.FromDB(row["LastOwnerID"]); prim.LastOwnerID = DBGuid.FromDB(row["LastOwnerID"]);
if (row["RezzerID"] != DBNull.Value)
prim.RezzerID = DBGuid.FromDB(row["RezzerID"]);
else
prim.RezzerID = UUID.Zero;
// explicit conversion of integers is required, which sort // explicit conversion of integers is required, which sort
// of sucks. No idea if there is a shortcut here or not. // of sucks. No idea if there is a shortcut here or not.
@ -1682,6 +1686,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("OwnerID", prim.OwnerID.ToString()); cmd.Parameters.AddWithValue("OwnerID", prim.OwnerID.ToString());
cmd.Parameters.AddWithValue("GroupID", prim.GroupID.ToString()); cmd.Parameters.AddWithValue("GroupID", prim.GroupID.ToString());
cmd.Parameters.AddWithValue("LastOwnerID", prim.LastOwnerID.ToString()); cmd.Parameters.AddWithValue("LastOwnerID", prim.LastOwnerID.ToString());
cmd.Parameters.AddWithValue("RezzerID", prim.RezzerID.ToString());
cmd.Parameters.AddWithValue("OwnerMask", prim.OwnerMask); cmd.Parameters.AddWithValue("OwnerMask", prim.OwnerMask);
cmd.Parameters.AddWithValue("NextOwnerMask", prim.NextOwnerMask); cmd.Parameters.AddWithValue("NextOwnerMask", prim.NextOwnerMask);
cmd.Parameters.AddWithValue("GroupMask", prim.GroupMask); cmd.Parameters.AddWithValue("GroupMask", prim.GroupMask);

View File

@ -453,3 +453,11 @@ MODIFY `cloud_scroll_x` float(9,7) NOT NULL DEFAULT '0.20',
MODIFY `cloud_scroll_y` float(9,7) NOT NULL DEFAULT '0.01'; MODIFY `cloud_scroll_y` float(9,7) NOT NULL DEFAULT '0.01';
COMMIT; COMMIT;
:VERSION 56 #----- Add RezzerID field in table prims
BEGIN;
ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL;
COMMIT;

View File

@ -363,3 +363,11 @@ CREATE TABLE IF NOT EXISTS bakedterrain(
Heightfield blob); Heightfield blob);
COMMIT; COMMIT;
:VERSION 35 #----- Add RezzerID field in table prims
BEGIN;
ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL;
COMMIT;

View File

@ -1216,6 +1216,7 @@ namespace OpenSim.Data.SQLite
createCol(prims, "OwnerID", typeof(String)); createCol(prims, "OwnerID", typeof(String));
createCol(prims, "GroupID", typeof(String)); createCol(prims, "GroupID", typeof(String));
createCol(prims, "LastOwnerID", typeof(String)); createCol(prims, "LastOwnerID", typeof(String));
createCol(prims, "RezzerID", typeof(String));
createCol(prims, "OwnerMask", typeof(Int32)); createCol(prims, "OwnerMask", typeof(Int32));
createCol(prims, "NextOwnerMask", typeof(Int32)); createCol(prims, "NextOwnerMask", typeof(Int32));
createCol(prims, "GroupMask", typeof(Int32)); createCol(prims, "GroupMask", typeof(Int32));
@ -1679,6 +1680,7 @@ namespace OpenSim.Data.SQLite
prim.OwnerID = new UUID((String)row["OwnerID"]); prim.OwnerID = new UUID((String)row["OwnerID"]);
prim.GroupID = new UUID((String)row["GroupID"]); prim.GroupID = new UUID((String)row["GroupID"]);
prim.LastOwnerID = new UUID((String)row["LastOwnerID"]); prim.LastOwnerID = new UUID((String)row["LastOwnerID"]);
prim.RezzerID = row["RezzerID"] == DBNull.Value ? UUID.Zero : new UUID((String)row["RezzerID"]);
prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
@ -2125,6 +2127,7 @@ namespace OpenSim.Data.SQLite
row["OwnerID"] = prim.OwnerID.ToString(); row["OwnerID"] = prim.OwnerID.ToString();
row["GroupID"] = prim.GroupID.ToString(); row["GroupID"] = prim.GroupID.ToString();
row["LastOwnerID"] = prim.LastOwnerID.ToString(); row["LastOwnerID"] = prim.LastOwnerID.ToString();
row["RezzerID"] = prim.RezzerID.ToString();
row["OwnerMask"] = prim.OwnerMask; row["OwnerMask"] = prim.OwnerMask;
row["NextOwnerMask"] = prim.NextOwnerMask; row["NextOwnerMask"] = prim.NextOwnerMask;
row["GroupMask"] = prim.GroupMask; row["GroupMask"] = prim.GroupMask;

View File

@ -59,6 +59,7 @@ namespace OpenSim.Framework
private int _invType = 0; private int _invType = 0;
private UUID _itemID = UUID.Zero; private UUID _itemID = UUID.Zero;
private UUID _lastOwnerID = UUID.Zero; private UUID _lastOwnerID = UUID.Zero;
private UUID _rezzerID = UUID.Zero;
private string _name = String.Empty; private string _name = String.Empty;
private uint _nextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL; private uint _nextOwnerMask = FULL_MASK_PERMISSIONS_GENERAL;
private UUID _ownerID = UUID.Zero; private UUID _ownerID = UUID.Zero;
@ -254,6 +255,16 @@ namespace OpenSim.Framework
} }
} }
public UUID RezzerID
{
get {
return _rezzerID;
}
set {
_rezzerID = value;
}
}
public string Name { public string Name {
get { get {
return _name; return _name;

View File

@ -1046,6 +1046,7 @@ namespace OpenSim.Region.ClientStack.Linden
prim.OwnerID = owner_id; prim.OwnerID = owner_id;
prim.GroupID = UUID.Zero; prim.GroupID = UUID.Zero;
prim.LastOwnerID = creatorID; prim.LastOwnerID = creatorID;
prim.RezzerID = creatorID;
prim.CreationDate = Util.UnixTimeSinceEpoch(); prim.CreationDate = Util.UnixTimeSinceEpoch();
if (grp == null) if (grp == null)
@ -1093,6 +1094,7 @@ namespace OpenSim.Region.ClientStack.Linden
{ {
grp = new SceneObjectGroup(prim); grp = new SceneObjectGroup(prim);
grp.LastOwnerID = creatorID; grp.LastOwnerID = creatorID;
grp.RezzerID = creatorID;
} }
else else
grp.AddPart(prim); grp.AddPart(prim);

View File

@ -284,6 +284,7 @@ namespace OpenSim.Region.ClientStack.Linden
prim.OwnerID = AgentId; prim.OwnerID = AgentId;
prim.GroupID = obj.GroupID; prim.GroupID = obj.GroupID;
prim.LastOwnerID = prim.OwnerID; prim.LastOwnerID = prim.OwnerID;
prim.RezzerID = AgentId;
prim.CreationDate = Util.UnixTimeSinceEpoch(); prim.CreationDate = Util.UnixTimeSinceEpoch();
prim.Name = obj.Name; prim.Name = obj.Name;
prim.Description = ""; prim.Description = "";

View File

@ -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. // Make the rezzer the owner, as this is not necessarily set correctly in the serialized asset.
part.LastOwnerID = part.OwnerID; part.LastOwnerID = part.OwnerID;
part.OwnerID = remoteClient.AgentId; part.OwnerID = remoteClient.AgentId;
part.RezzerID = remoteClient.AgentId;
} }
} }
@ -1150,6 +1151,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
part.LastOwnerID = part.OwnerID; part.LastOwnerID = part.OwnerID;
part.OwnerID = item.Owner; part.OwnerID = item.Owner;
part.RezzerID = item.Owner;
part.Inventory.ChangeInventoryOwner(item.Owner); part.Inventory.ChangeInventoryOwner(item.Owner);
} }

View File

@ -2625,6 +2625,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
group.FromPartID = sourcePart.UUID; group.FromPartID = sourcePart.UUID;
group.RezzerID = group.FromPartID;
if( i == 0) if( i == 0)
AddNewSceneObject(group, true, curpos, rot, vel); AddNewSceneObject(group, true, curpos, rot, vel);
else else

View File

@ -1942,6 +1942,7 @@ namespace OpenSim.Region.Framework.Scenes
else else
{ {
part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID; part.LastOwnerID = part.ParentGroup.RootPart.LastOwnerID;
part.RezzerID = part.ParentGroup.RootPart.RezzerID;
childParts.Add(part); childParts.Add(part);
} }
} }

View File

@ -886,6 +886,12 @@ namespace OpenSim.Region.Framework.Scenes
set { m_rootPart.LastOwnerID = value; } set { m_rootPart.LastOwnerID = value; }
} }
public UUID RezzerID
{
get { return m_rootPart.RezzerID; }
set { m_rootPart.RezzerID = value; }
}
public UUID OwnerID public UUID OwnerID
{ {
get { return m_rootPart.OwnerID; } get { return m_rootPart.OwnerID; }

View File

@ -460,7 +460,7 @@ namespace OpenSim.Region.Framework.Scenes
m_name = "Object"; m_name = "Object";
CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed); CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
LastOwnerID = CreatorID = OwnerID = ownerID; RezzerID = LastOwnerID = CreatorID = OwnerID = ownerID;
UUID = UUID.Random(); UUID = UUID.Random();
Shape = shape; Shape = shape;
OwnershipCost = 0; OwnershipCost = 0;
@ -484,6 +484,7 @@ namespace OpenSim.Region.Framework.Scenes
#region XML Schema #region XML Schema
private UUID _rezzerID;
private UUID _lastOwnerID; private UUID _lastOwnerID;
private UUID _ownerID; private UUID _ownerID;
private UUID _groupID; private UUID _groupID;
@ -1385,6 +1386,12 @@ namespace OpenSim.Region.Framework.Scenes
set { _lastOwnerID = value; } set { _lastOwnerID = value; }
} }
public UUID RezzerID
{
get { return _rezzerID; }
set { _rezzerID = value; }
}
public uint BaseMask public uint BaseMask
{ {
get { return _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. // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
dupe.LastOwnerID = OwnerID; dupe.LastOwnerID = OwnerID;
dupe.RezzerID = RezzerID;
byte[] extraP = new byte[Shape.ExtraParams.Length]; byte[] extraP = new byte[Shape.ExtraParams.Length];
Array.Copy(Shape.ExtraParams, extraP, extraP.Length); Array.Copy(Shape.ExtraParams, extraP, extraP.Length);

View File

@ -428,6 +428,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
m_SOPXmlProcessors.Add("GroupID", ProcessGroupID); m_SOPXmlProcessors.Add("GroupID", ProcessGroupID);
m_SOPXmlProcessors.Add("OwnerID", ProcessOwnerID); m_SOPXmlProcessors.Add("OwnerID", ProcessOwnerID);
m_SOPXmlProcessors.Add("LastOwnerID", ProcessLastOwnerID); m_SOPXmlProcessors.Add("LastOwnerID", ProcessLastOwnerID);
m_SOPXmlProcessors.Add("RezzerID", ProcessRezzerID);
m_SOPXmlProcessors.Add("BaseMask", ProcessBaseMask); m_SOPXmlProcessors.Add("BaseMask", ProcessBaseMask);
m_SOPXmlProcessors.Add("OwnerMask", ProcessOwnerMask); m_SOPXmlProcessors.Add("OwnerMask", ProcessOwnerMask);
m_SOPXmlProcessors.Add("GroupMask", ProcessGroupMask); m_SOPXmlProcessors.Add("GroupMask", ProcessGroupMask);
@ -864,6 +865,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); 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) private static void ProcessBaseMask(SceneObjectPart obj, XmlReader reader)
{ {
obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); 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; UUID lastOwnerID = options.ContainsKey("wipe-owners") ? UUID.Zero : sop.LastOwnerID;
WriteUUID(writer, "LastOwnerID", lastOwnerID, options); 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("BaseMask", sop.BaseMask.ToString());
writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString()); writer.WriteElementString("OwnerMask", sop.OwnerMask.ToString());
writer.WriteElementString("GroupMask", sop.GroupMask.ToString()); writer.WriteElementString("GroupMask", sop.GroupMask.ToString());

View File

@ -13793,6 +13793,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} catch { }; } catch { };
ret.Add(new LSL_Integer(invcount)); ret.Add(new LSL_Integer(invcount));
break; break;
case ScriptBaseClass.OBJECT_REZZER_KEY:
ret.Add(new LSL_Key(id));
break;
case ScriptBaseClass.OBJECT_GROUP_TAG: case ScriptBaseClass.OBJECT_GROUP_TAG:
ret.Add(new LSL_String(av.Grouptitle)); ret.Add(new LSL_String(av.Grouptitle));
break; break;
@ -13988,6 +13991,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
count += parts[i].Inventory.Count; count += parts[i].Inventory.Count;
ret.Add(new LSL_Integer(count)); ret.Add(new LSL_Integer(count));
break; break;
case ScriptBaseClass.OBJECT_REZZER_KEY:
ret.Add(new LSL_Key(obj.ParentGroup.RezzerID.ToString()));
break;
case ScriptBaseClass.OBJECT_GROUP_TAG: case ScriptBaseClass.OBJECT_GROUP_TAG:
ret.Add(new LSL_String(String.Empty)); ret.Add(new LSL_String(String.Empty));
break; break;

View File

@ -640,6 +640,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int OBJECT_OMEGA = 29; public const int OBJECT_OMEGA = 29;
public const int OBJECT_PRIM_COUNT = 30; public const int OBJECT_PRIM_COUNT = 30;
public const int OBJECT_TOTAL_INVENTORY_COUNT = 31; 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_GROUP_TAG = 33;
public const int OBJECT_TEMP_ATTACHED = 34; public const int OBJECT_TEMP_ATTACHED = 34;