aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.RegionServer
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.RegionServer')
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.API.cs30
-rw-r--r--OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs25
2 files changed, 47 insertions, 8 deletions
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
51 public event StartAnim OnStartAnim; 51 public event StartAnim OnStartAnim;
52 public event GenericCall OnRequestAvatarsData; 52 public event GenericCall OnRequestAvatarsData;
53 public event LinkObjects OnLinkObjects; 53 public event LinkObjects OnLinkObjects;
54 public event UpdateVector OnGrapObject;
55 public event ObjectSelect OnDeGrapObject;
56 public event MoveObject OnGrapUpdate;
54 public event GenericCall4 OnAddPrim; 57 public event GenericCall4 OnAddPrim;
55 public event UpdateShape OnUpdatePrimShape; 58 public event UpdateShape OnUpdatePrimShape;
56 public event ObjectSelect OnObjectSelect; 59 public event ObjectSelect OnObjectSelect;
57 public event UpdatePrimFlags OnUpdatePrimFlags; 60 public event UpdatePrimFlags OnUpdatePrimFlags;
58 public event UpdatePrimTexture OnUpdatePrimTexture; 61 public event UpdatePrimTexture OnUpdatePrimTexture;
59 public event UpdatePrimVector OnUpdatePrimPosition; 62 public event UpdateVector OnUpdatePrimPosition;
60 public event UpdatePrimRotation OnUpdatePrimRotation; 63 public event UpdatePrimRotation OnUpdatePrimRotation;
61 public event UpdatePrimVector OnUpdatePrimScale; 64 public event UpdateVector OnUpdatePrimScale;
62 public event StatusChange OnChildAgentStatus; 65 public event StatusChange OnChildAgentStatus;
63 public event GenericCall2 OnStopMovement; 66 public event GenericCall2 OnStopMovement;
64 public event NewAvatar OnNewAvatar; 67 public event NewAvatar OnNewAvatar;
@@ -426,6 +429,17 @@ namespace OpenSim
426 OutPacket(tpStart); 429 OutPacket(tpStart);
427 } 430 }
428 431
432 public void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance)
433 {
434 MoneyBalanceReplyPacket money = new MoneyBalanceReplyPacket();
435 money.MoneyData.AgentID = this.AgentID;
436 money.MoneyData.TransactionID = transaction;
437 money.MoneyData.TransactionSuccess = success;
438 money.MoneyData.Description = description;
439 money.MoneyData.MoneyBalance = balance;
440 OutPacket(money);
441 }
442
429 #region Appearance/ Wearables Methods 443 #region Appearance/ Wearables Methods
430 444
431 /// <summary> 445 /// <summary>
@@ -569,13 +583,13 @@ namespace OpenSim
569 /// <param name="pos"></param> 583 /// <param name="pos"></param>
570 /// <param name="rotation"></param> 584 /// <param name="rotation"></param>
571 /// <param name="textureID"></param> 585 /// <param name="textureID"></param>
572 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID) 586 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLQuaternion rotation, LLUUID textureID, uint flags)
573 { 587 {
574 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 588 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
575 outPacket.RegionData.RegionHandle = regionHandle; 589 outPacket.RegionData.RegionHandle = regionHandle;
576 outPacket.RegionData.TimeDilation = timeDilation; 590 outPacket.RegionData.TimeDilation = timeDilation;
577 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 591 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
578 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID); 592 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
579 outPacket.ObjectData[0].ID = localID; 593 outPacket.ObjectData[0].ID = localID;
580 outPacket.ObjectData[0].FullID = primData.FullID; 594 outPacket.ObjectData[0].FullID = primData.FullID;
581 byte[] pb = pos.GetBytes(); 595 byte[] pb = pos.GetBytes();
@@ -592,13 +606,13 @@ namespace OpenSim
592 /// </summary> 606 /// </summary>
593 /// <param name="primData"></param> 607 /// <param name="primData"></param>
594 /// <param name="pos"></param> 608 /// <param name="pos"></param>
595 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID) 609 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimData primData, LLVector3 pos, LLUUID textureID , uint flags)
596 { 610 {
597 ObjectUpdatePacket outPacket = new ObjectUpdatePacket(); 611 ObjectUpdatePacket outPacket = new ObjectUpdatePacket();
598 outPacket.RegionData.RegionHandle = regionHandle; 612 outPacket.RegionData.RegionHandle = regionHandle;
599 outPacket.RegionData.TimeDilation = timeDilation; 613 outPacket.RegionData.TimeDilation = timeDilation;
600 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 614 outPacket.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
601 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID); 615 outPacket.ObjectData[0] = this.CreatePrimUpdateBlock(primData, textureID, flags);
602 outPacket.ObjectData[0].ID = localID; 616 outPacket.ObjectData[0].ID = localID;
603 outPacket.ObjectData[0].FullID = primData.FullID; 617 outPacket.ObjectData[0].FullID = primData.FullID;
604 byte[] pb = pos.GetBytes(); 618 byte[] pb = pos.GetBytes();
@@ -786,11 +800,11 @@ namespace OpenSim
786 /// </summary> 800 /// </summary>
787 /// <param name="primData"></param> 801 /// <param name="primData"></param>
788 /// <returns></returns> 802 /// <returns></returns>
789 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID) 803 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(PrimData primData, LLUUID textureID, uint flags)
790 { 804 {
791 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock(); 805 ObjectUpdatePacket.ObjectDataBlock objupdate = new ObjectUpdatePacket.ObjectDataBlock();
792 this.SetDefaultPrimPacketValues(objupdate); 806 this.SetDefaultPrimPacketValues(objupdate);
793 objupdate.UpdateFlags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456; 807 objupdate.UpdateFlags = flags;
794 this.SetPrimPacketShapeData(objupdate, primData, textureID); 808 this.SetPrimPacketShapeData(objupdate, primData, textureID);
795 809
796 return objupdate; 810 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
254 } 254 }
255 } 255 }
256 break; 256 break;
257 case PacketType.ObjectGrab:
258 ObjectGrabPacket grap = (ObjectGrabPacket)Pack;
259 if (OnGrapObject != null)
260 {
261 OnGrapObject(grap.ObjectData.LocalID, grap.ObjectData.GrabOffset, this);
262 }
263 break;
264 case PacketType.ObjectGrabUpdate:
265 ObjectGrabUpdatePacket grapUpdate = (ObjectGrabUpdatePacket)Pack;
266 if (OnGrapUpdate != null)
267 {
268 OnGrapUpdate(grapUpdate.ObjectData.ObjectID, grapUpdate.ObjectData.GrabOffsetInitial, grapUpdate.ObjectData.GrabPosition, this);
269 }
270 break;
271 case PacketType.ObjectDeGrab:
272 ObjectDeGrabPacket deGrap = (ObjectDeGrabPacket)Pack;
273 if (OnDeGrapObject != null)
274 {
275 OnDeGrapObject(deGrap.ObjectData.LocalID, this);
276 }
277 break;
257 #endregion 278 #endregion
258 279
259 #region Inventory/Asset/Other related packets 280 #region Inventory/Asset/Other related packets
@@ -468,6 +489,10 @@ namespace OpenSim
468 break; 489 break;
469 #endregion 490 #endregion
470 491
492 case PacketType.MoneyBalanceRequest:
493 this.SendMoneyBalance(LLUUID.Zero, true, new byte[0], 1000);
494 break;
495
471 #region Parcel related packets 496 #region Parcel related packets
472 case PacketType.ParcelPropertiesRequest: 497 case PacketType.ParcelPropertiesRequest:
473 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; 498 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;