From 2c04171990df9e01cd4c5aa600a6eaa1487f9605 Mon Sep 17 00:00:00 2001 From: mingchen Date: Fri, 8 Jun 2007 21:30:51 +0000 Subject: *Added delegates and events for parcel and estate management *Only thing left is to get the master user setup in both sandbox and grid mode --- OpenSim/OpenSim.RegionServer/ClientView.API.cs | 8 +++++++ .../ClientView.ProcessPackets.cs | 25 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) (limited to 'OpenSim/OpenSim.RegionServer') diff --git a/OpenSim/OpenSim.RegionServer/ClientView.API.cs b/OpenSim/OpenSim.RegionServer/ClientView.API.cs index dd9adac..a6e5317 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.API.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.API.cs @@ -4,6 +4,7 @@ using System.Text; using OpenSim.Framework.Interfaces; using OpenSim.Framework.Inventory; using OpenSim.Framework.Types; + using libsecondlife; using libsecondlife.Packets; @@ -36,6 +37,13 @@ namespace OpenSim public event NewAvatar OnNewAvatar; public event GenericCall6 OnRemoveAvatar; + public event ParcelPropertiesRequest OnParcelPropertiesRequest; + public event ParcelDivideRequest OnParcelDivideRequest; + public event ParcelJoinRequest OnParcelJoinRequest; + public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; + + public event EstateOwnerMessageRequest OnEstateOwnerMessage; + /// /// /// diff --git a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs index d215a23..8b94a82 100644 --- a/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs +++ b/OpenSim/OpenSim.RegionServer/ClientView.ProcessPackets.cs @@ -454,6 +454,31 @@ namespace OpenSim break; #endregion + #region Parcel related packets + case PacketType.ParcelPropertiesRequest: + ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; + OnParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West), (int)Math.Round(propertiesRequest.ParcelData.South), (int)Math.Round(propertiesRequest.ParcelData.East), (int)Math.Round(propertiesRequest.ParcelData.North), propertiesRequest.ParcelData.SequenceID, propertiesRequest.ParcelData.SnapSelection, this); + break; + case PacketType.ParcelDivide: + ParcelDividePacket parcelDivide = (ParcelDividePacket)Pack; + OnParcelDivideRequest((int)Math.Round(parcelDivide.ParcelData.West), (int)Math.Round(parcelDivide.ParcelData.South), (int)Math.Round(parcelDivide.ParcelData.East), (int)Math.Round(parcelDivide.ParcelData.North), this); + break; + case PacketType.ParcelJoin: + ParcelJoinPacket parcelJoin = (ParcelJoinPacket)Pack; + OnParcelJoinRequest((int)Math.Round(parcelJoin.ParcelData.West), (int)Math.Round(parcelJoin.ParcelData.South), (int)Math.Round(parcelJoin.ParcelData.East), (int)Math.Round(parcelJoin.ParcelData.North), this); + break; + case PacketType.ParcelPropertiesUpdate: + ParcelPropertiesUpdatePacket updatePacket = (ParcelPropertiesUpdatePacket)Pack; + OnParcelPropertiesUpdateRequest(updatePacket, this); + break; + #endregion + + #region Estate Packets + case PacketType.EstateOwnerMessage: + EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; + OnEstateOwnerMessage(messagePacket, this); + break; + #endregion #region unimplemented handlers case PacketType.AgentIsNowWearing: // AgentIsNowWearingPacket wear = (AgentIsNowWearingPacket)Pack; -- cgit v1.1