From 179695909a8967bcdb092720a19c264d52fb4515 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Thu, 15 Nov 2007 07:32:24 +0000
Subject: * Implemented the little friendly pop tooltip messages that appear
when you hover your mouse over prim with the object name, description,
ownerid.. etc.
---
OpenSim/Region/Environment/Scenes/InnerScene.cs | 17 +++++++++++
OpenSim/Region/Environment/Scenes/Scene.cs | 2 +-
.../Region/Environment/Scenes/SceneObjectGroup.cs | 34 ++++++++++++++++++++++
.../Region/Environment/Scenes/SceneObjectPart.cs | 34 +++++++++++++++++++---
4 files changed, 82 insertions(+), 5 deletions(-)
(limited to 'OpenSim/Region/Environment')
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index c436b89..1625e80 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -354,6 +354,23 @@ namespace OpenSim.Region.Environment.Scenes
}
///
+ /// This handles the nifty little tool tip that you get when you drag your mouse over an object
+ /// Send to the Object Group to process. We don't know enough to service the request
+ ///
+ ///
+ ///
+ ///
+ ///
+ public void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID ObjectID)
+ {
+ SceneObjectGroup group = GetGroupByPrim(ObjectID);
+ if (group != null)
+ group.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
+
+
+ }
+
+ ///
///
///
///
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d7e36c5..0f1642f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Environment.Scenes
client.OnDelinkObjects += m_innerScene.DelinkObjects;
client.OnObjectDuplicate += m_innerScene.DuplicateObject;
client.OnUpdatePrimFlags += m_innerScene.UpdatePrimFlags;
-
+ client.OnRequestObjectPropertiesFamily += m_innerScene.RequestObjectPropertiesFamily;
client.OnParcelPropertiesRequest += new ParcelPropertiesRequest(m_LandManager.handleParcelPropertiesRequest);
client.OnParcelDivideRequest += new ParcelDivideRequest(m_LandManager.handleParcelDivideRequest);
client.OnParcelJoinRequest += new ParcelJoinRequest(m_LandManager.handleParcelJoinRequest);
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index c9b6e9f..38e1609 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -462,6 +462,7 @@ namespace OpenSim.Region.Environment.Scenes
dupe.AbsolutePosition = new LLVector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
dupe.m_scene = m_scene;
dupe.m_regionHandle = m_regionHandle;
+
dupe.CopyRootPart(m_rootPart, OwnerID, GroupID);
@@ -519,6 +520,7 @@ namespace OpenSim.Region.Environment.Scenes
SetPartAsRoot(newPart);
}
public void SetRootPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) {
+ part.LastOwnerID = part.OwnerID;
part.OwnerID = cAgentID;
part.GroupID = cGroupID;
part.ScheduleFullUpdate();
@@ -535,6 +537,38 @@ namespace OpenSim.Region.Environment.Scenes
m_parts.Add(newPart.UUID, newPart);
SetPartAsNonRoot(newPart);
}
+
+ ///
+ ///
+ ///
+ ///
+ public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient,LLUUID AgentID, uint RequestFlags)
+ {
+ //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
+ ObjectPropertiesFamilyPacket objPropFamilyPack = new ObjectPropertiesFamilyPacket();
+ ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
+ objPropDB.RequestFlags = RequestFlags;
+ objPropDB.ObjectID = RootPart.UUID;
+ objPropDB.OwnerID = RootPart.ObjectOwner;
+ objPropDB.GroupID = RootPart.GroupID;
+ objPropDB.BaseMask = RootPart.BaseMask;
+ objPropDB.OwnerMask = RootPart.OwnerMask;
+ objPropDB.GroupMask = RootPart.GroupMask;
+ objPropDB.EveryoneMask = RootPart.EveryoneMask;
+ objPropDB.NextOwnerMask = RootPart.NextOwnerMask;
+
+ // TODO: More properties are needed in SceneObjectPart!
+ objPropDB.OwnershipCost = RootPart.OwnershipCost;
+ objPropDB.SaleType = RootPart.ObjectSaleType;
+ objPropDB.SalePrice = RootPart.SalePrice;
+ objPropDB.Category = RootPart.Category;
+ objPropDB.LastOwnerID = RootPart.CreatorID;
+ objPropDB.Name = Helpers.StringToField(RootPart.Name);
+ objPropDB.Description = Helpers.StringToField(RootPart.Description);
+ objPropFamilyPack.ObjectData = objPropDB;
+ remoteClient.OutPacket(objPropFamilyPack);
+
+ }
public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID)
{
part.OwnerID = cAgentID;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 70b8829..727ebb0 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -51,13 +51,18 @@ namespace OpenSim.Region.Environment.Scenes
[XmlIgnore] public PhysicsActor PhysActor = null;
protected Dictionary TaskInventory = new Dictionary();
-
+ public LLUUID LastOwnerID;
public LLUUID OwnerID;
public LLUUID GroupID;
- public LLUUID LastOwnerID;
+ public int OwnershipCost;
+ public byte ObjectSaleType;
+ public int SalePrice;
+ public uint Category;
+
public Int32 CreationDate;
public uint ParentID = 0;
+
public uint OwnerMask = FULL_MASK_PERMISSIONS;
public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
public uint GroupMask = FULL_MASK_PERMISSIONS;
@@ -68,6 +73,7 @@ namespace OpenSim.Region.Environment.Scenes
[XmlIgnore] public uint TimeStampFull = 0;
[XmlIgnore] public uint TimeStampTerse = 0;
+ [XmlIgnore] public uint TimeStampLastActivity = 0; // Will be used for AutoReturn
protected SceneObjectGroup m_parentGroup;
@@ -418,7 +424,13 @@ namespace OpenSim.Region.Environment.Scenes
UUID = LLUUID.Random();
LocalID = (uint) (localID);
Shape = shape;
-
+ // Todo: Add More Object Parameter from above!
+ OwnershipCost = 0;
+ ObjectSaleType = (byte)0;
+ SalePrice = 0;
+ Category = (uint)0;
+ LastOwnerID = CreatorID;
+ // End Todo: ///
GroupPosition = groupPosition;
OffsetPosition = offsetPosition;
RotationOffset = rotationOffset;
@@ -467,8 +479,14 @@ namespace OpenSim.Region.Environment.Scenes
LastOwnerID = lastOwnerID;
UUID = LLUUID.Random();
LocalID = (uint) (localID);
+ // Todo: Add More parameters from above
Shape = shape;
-
+ OwnershipCost = 0;
+ ObjectSaleType = (byte)0;
+ SalePrice = 0;
+ Category = (uint)0;
+ // End Todo: ///
+ LastOwnerID = CreatorID;
OffsetPosition = position;
RotationOffset = rotation;
ObjectFlags = flags;
@@ -538,6 +556,14 @@ namespace OpenSim.Region.Environment.Scenes
dupe.AngularVelocity = new LLVector3(0, 0, 0);
dupe.ObjectFlags = ObjectFlags;
+ dupe.OwnershipCost = OwnershipCost;
+ dupe.ObjectSaleType = ObjectSaleType;
+ dupe.SalePrice = SalePrice;
+ dupe.Category = Category;
+
+ // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
+ dupe.LastOwnerID = ObjectOwner;
+
byte[] extraP = new byte[Shape.ExtraParams.Length];
Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
dupe.Shape.ExtraParams = extraP;
--
cgit v1.1