From f41379549773531b2886b64aaacf57c954a64610 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 25 Jun 2007 16:01:30 +0000
Subject: updated prebuild.xml. Added some more events to IClientAPI
(OnGrapObject , OnGrapUpdate, OnDeGrapObject).
---
OpenSim/OpenSim.RegionServer/ClientView.API.cs | 30 ++++++++++++++++------
.../ClientView.ProcessPackets.cs | 25 ++++++++++++++++++
2 files changed, 47 insertions(+), 8 deletions(-)
(limited to 'OpenSim/OpenSim.RegionServer')
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
index ca473e3..902f3c7 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs
@@ -51,14 +51,17 @@ namespace OpenSim
public event StartAnim OnStartAnim;
public event GenericCall OnRequestAvatarsData;
public event LinkObjects OnLinkObjects;
+ public event UpdateVector OnGrapObject;
+ public event ObjectSelect OnDeGrapObject;
+ public event MoveObject OnGrapUpdate;
public event GenericCall4 OnAddPrim;
public event UpdateShape OnUpdatePrimShape;
public event ObjectSelect OnObjectSelect;
public event UpdatePrimFlags OnUpdatePrimFlags;
public event UpdatePrimTexture OnUpdatePrimTexture;
- public event UpdatePrimVector OnUpdatePrimPosition;
+ public event UpdateVector OnUpdatePrimPosition;
public event UpdatePrimRotation OnUpdatePrimRotation;
- public event UpdatePrimVector OnUpdatePrimScale;
+ public event UpdateVector OnUpdatePrimScale;
public event StatusChange OnChildAgentStatus;
public event GenericCall2 OnStopMovement;
public event NewAvatar OnNewAvatar;
@@ -426,6 +429,17 @@ namespace OpenSim
OutPacket(tpStart);
}
+ public void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance)
+ {
+ MoneyBalanceReplyPacket money = new MoneyBalanceReplyPacket();
+ money.MoneyData.AgentID = this.AgentID;
+ money.MoneyData.TransactionID = transaction;
+ money.MoneyData.TransactionSuccess = success;
+ money.MoneyData.Description = description;
+ money.MoneyData.MoneyBalance = balance;
+ OutPacket(money);
+ }
+
#region Appearance/ Wearables Methods
///
@@ -569,13 +583,13 @@ namespace OpenSim
///
///
///
- public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID)
+ public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags)
{
ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
outPacket.RegionData.RegionHandle = regionHandle;
outPacket.RegionData.TimeDilation = timeDilation;
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
- outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID);
+ outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
outPacket.ObjectData[0].ID = localID;
outPacket.ObjectData[0].FullID = primData.FullID;
byte[] pb = pos.GetBytes();
@@ -592,13 +606,13 @@ namespace OpenSim
///
///
///
- public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID)
+ public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID , uint flags)
{
ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
outPacket.RegionData.RegionHandle = regionHandle;
outPacket.RegionData.TimeDilation = timeDilation;
outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
- outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID);
+ outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
outPacket.ObjectData[0].ID = localID;
outPacket.ObjectData[0].FullID = primData.FullID;
byte[] pb = pos.GetBytes();
@@ -786,11 +800,11 @@ namespace OpenSim
///
///
///
- protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID)
+ protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID, uint flags)
{
ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
this.SetDefaultPrimPacketValues(objupdate);
- objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456;
+ objupdate.UpdateFlags = flags;
this.SetPrimPacketShapeData(objupdate, primData, textureID);
return objupdate;
diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
index 65066b8..191ef21 100644
--- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
+++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs
@@ -254,6 +254,27 @@ namespace OpenSim
}
}
break;
+ case PacketType.ObjectGrab:
+ ObjectGrabPacket grap = (ObjectGrabPacket)Pack;
+ if (OnGrapObject != null)
+ {
+ OnGrapObject(grap.ObjectData.LocalID, grap.ObjectData.GrabOffset, this);
+ }
+ break;
+ case PacketType.ObjectGrabUpdate:
+ ObjectGrabUpdatePacket grapUpdate = (ObjectGrabUpdatePacket)Pack;
+ if (OnGrapUpdate != null)
+ {
+ OnGrapUpdate(grapUpdate.ObjectData.ObjectID, grapUpdate.ObjectData.GrabOffsetInitial, grapUpdate.ObjectData.GrabPosition, this);
+ }
+ break;
+ case PacketType.ObjectDeGrab:
+ ObjectDeGrabPacket deGrap = (ObjectDeGrabPacket)Pack;
+ if (OnDeGrapObject != null)
+ {
+ OnDeGrapObject(deGrap.ObjectData.LocalID, this);
+ }
+ break;
#endregion
#region Inventory/Asset/Other related packets
@@ -468,6 +489,10 @@ namespace OpenSim
break;
#endregion
+ case PacketType.MoneyBalanceRequest:
+ this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000);
+ break;
+
#region Parcel related packets
case PacketType.ParcelPropertiesRequest:
ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
--
cgit v1.1