* Implemented the little friendly pop tooltip messages that appear when you hover your mouse over prim with the object name, description, ownerid.. etc.
parent
3ca8eb82a9
commit
179695909a
|
@ -203,6 +203,8 @@ namespace OpenSim.Framework
|
|||
|
||||
public delegate void ObjectSelect(uint localID, IClientAPI remoteClient);
|
||||
|
||||
public delegate void RequestObjectPropertiesFamily(IClientAPI remoteClient,LLUUID AgentID, uint RequestFlags, LLUUID TaskID);
|
||||
|
||||
public delegate void ObjectDeselect(uint localID, IClientAPI remoteClient);
|
||||
|
||||
public delegate void UpdatePrimFlags(uint localID, Packet packet, IClientAPI remoteClient);
|
||||
|
@ -320,6 +322,7 @@ namespace OpenSim.Framework
|
|||
event ObjectDeselect OnObjectDeselect;
|
||||
event GenericCall7 OnObjectDescription;
|
||||
event GenericCall7 OnObjectName;
|
||||
event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
|
||||
event UpdatePrimFlags OnUpdatePrimFlags;
|
||||
event UpdatePrimTexture OnUpdatePrimTexture;
|
||||
event UpdateVector OnUpdatePrimGroupPosition;
|
||||
|
|
|
@ -71,6 +71,7 @@ namespace OpenSim.Region.ClientStack
|
|||
public event ObjectDeselect OnObjectDeselect;
|
||||
public event GenericCall7 OnObjectDescription;
|
||||
public event GenericCall7 OnObjectName;
|
||||
public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
|
||||
public event UpdatePrimFlags OnUpdatePrimFlags;
|
||||
public event UpdatePrimTexture OnUpdatePrimTexture;
|
||||
public event UpdateVector OnUpdatePrimGroupPosition;
|
||||
|
|
|
@ -395,6 +395,22 @@ namespace OpenSim.Region.ClientStack
|
|||
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
|
||||
break;
|
||||
|
||||
case PacketType.RequestObjectPropertiesFamily:
|
||||
//This powers the little tooltip that appears when you move your mouse over an object
|
||||
RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
|
||||
|
||||
|
||||
RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData;
|
||||
|
||||
if (OnRequestObjectPropertiesFamily != null)
|
||||
{
|
||||
OnRequestObjectPropertiesFamily(this, this.m_agentId, packObjBlock.RequestFlags, packObjBlock.ObjectID);
|
||||
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Inventory/Asset/Other related packets
|
||||
|
@ -725,6 +741,7 @@ namespace OpenSim.Region.ClientStack
|
|||
}
|
||||
break;
|
||||
case PacketType.ParcelObjectOwnersRequest:
|
||||
//System.Console.WriteLine(Pack.ToString());
|
||||
ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket) Pack;
|
||||
if (OnParcelObjectOwnerRequest != null)
|
||||
{
|
||||
|
@ -747,7 +764,18 @@ namespace OpenSim.Region.ClientStack
|
|||
#endregion
|
||||
|
||||
#region unimplemented handlers
|
||||
case PacketType.StartPingCheck:
|
||||
// Send the client the ping response back
|
||||
// Pass the same PingID in the matching packet
|
||||
// Handled In the packet processing
|
||||
OpenSim.Framework.Console.MainLog.Instance.Debug("CLIENT", "possibly unhandled packet " + Pack.ToString());
|
||||
break;
|
||||
case PacketType.CompletePingCheck:
|
||||
// Parhaps this should be processed on the Sim to determine whether or not to drop a dead client
|
||||
// Dumping it to the verbose console until it's handled properly.
|
||||
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
|
||||
break;
|
||||
case PacketType.AgentIsNowWearing:
|
||||
// AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack;
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("CLIENT", "unhandled packet " + Pack.ToString());
|
||||
|
|
|
@ -353,6 +353,23 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
group.Resize(scale, localID);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="AgentID"></param>
|
||||
/// <param name="RequestFlags"></param>
|
||||
/// <param name="ObjectID"></param>
|
||||
public void RequestObjectPropertiesFamily(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags, LLUUID ObjectID)
|
||||
{
|
||||
SceneObjectGroup group = GetGroupByPrim(ObjectID);
|
||||
if (group != null)
|
||||
group.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="part"></param>
|
||||
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;
|
||||
|
|
|
@ -51,13 +51,18 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
[XmlIgnore] public PhysicsActor PhysActor = null;
|
||||
|
||||
protected Dictionary<LLUUID, TaskInventoryItem> TaskInventory = new Dictionary<LLUUID, TaskInventoryItem>();
|
||||
|
||||
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;
|
||||
|
|
|
@ -83,6 +83,7 @@ namespace SimpleApp
|
|||
|
||||
public event UpdateShape OnUpdatePrimShape;
|
||||
public event ObjectExtraParams OnUpdateExtraParams;
|
||||
public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
|
||||
public event ObjectSelect OnObjectSelect;
|
||||
public event GenericCall7 OnObjectDescription;
|
||||
public event GenericCall7 OnObjectName;
|
||||
|
|
Loading…
Reference in New Issue