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, " +
"RegionUUID, CreatorID, " +
"OwnerID, GroupID, " +
"LastOwnerID, SceneGroupID, " +
"LastOwnerID, RezzerID, SceneGroupID, " +
"PayPrice, PayButton1, " +
"PayButton2, PayButton3, " +
"PayButton4, LoopedSound, " +
@ -207,7 +207,7 @@ namespace OpenSim.Data.MySQL
"?SitTargetOrientW, ?SitTargetOrientX, " +
"?SitTargetOrientY, ?SitTargetOrientZ, " +
"?RegionUUID, ?CreatorID, ?OwnerID, " +
"?GroupID, ?LastOwnerID, ?SceneGroupID, " +
"?GroupID, ?LastOwnerID, ?RezzerID, ?SceneGroupID, " +
"?PayPrice, ?PayButton1, ?PayButton2, " +
"?PayButton3, ?PayButton4, ?LoopedSound, " +
"?LoopedSoundGain, ?TextureAnimation, " +
@ -1279,6 +1279,10 @@ namespace OpenSim.Data.MySQL
prim.OwnerID = DBGuid.FromDB(row["OwnerID"]);
prim.GroupID = DBGuid.FromDB(row["GroupID"]);
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
// 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("GroupID", prim.GroupID.ToString());
cmd.Parameters.AddWithValue("LastOwnerID", prim.LastOwnerID.ToString());
cmd.Parameters.AddWithValue("RezzerID", prim.RezzerID.ToString());
cmd.Parameters.AddWithValue("OwnerMask", prim.OwnerMask);
cmd.Parameters.AddWithValue("NextOwnerMask", prim.NextOwnerMask);
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';
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);
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, "GroupID", typeof(String));
createCol(prims, "LastOwnerID", typeof(String));
createCol(prims, "RezzerID", typeof(String));
createCol(prims, "OwnerMask", typeof(Int32));
createCol(prims, "NextOwnerMask", typeof(Int32));
createCol(prims, "GroupMask", typeof(Int32));
@ -1679,6 +1680,7 @@ namespace OpenSim.Data.SQLite
prim.OwnerID = new UUID((String)row["OwnerID"]);
prim.GroupID = new UUID((String)row["GroupID"]);
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.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
@ -2125,6 +2127,7 @@ namespace OpenSim.Data.SQLite
row["OwnerID"] = prim.OwnerID.ToString();
row["GroupID"] = prim.GroupID.ToString();
row["LastOwnerID"] = prim.LastOwnerID.ToString();
row["RezzerID"] = prim.RezzerID.ToString();
row["OwnerMask"] = prim.OwnerMask;
row["NextOwnerMask"] = prim.NextOwnerMask;
row["GroupMask"] = prim.GroupMask;

View File

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

View File

@ -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);

View File

@ -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 = "";

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.
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);
}

View File

@ -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

View File

@ -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);
}
}

View File

@ -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; }

View File

@ -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);

View File

@ -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());

View File

@ -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;

View File

@ -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;