diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 69c1dac..b616acb 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -229,6 +229,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
229 | // private RequestAsset handlerRequestAsset = null; // OnRequestAsset; | 229 | // private RequestAsset handlerRequestAsset = null; // OnRequestAsset; |
230 | private UUIDNameRequest handlerTeleportHomeRequest = null; | 230 | private UUIDNameRequest handlerTeleportHomeRequest = null; |
231 | 231 | ||
232 | private RegionHandleRequest handlerRegionHandleRequest = null; // OnRegionHandleRequest | ||
233 | private ParcelInfoRequest handlerParcelInfoRequest = null; // OnParcelInfoRequest | ||
234 | |||
232 | private ScriptAnswer handlerScriptAnswer = null; | 235 | private ScriptAnswer handlerScriptAnswer = null; |
233 | private RequestPayPrice handlerRequestPayPrice = null; | 236 | private RequestPayPrice handlerRequestPayPrice = null; |
234 | private ObjectDeselect handlerObjectDetach = null; | 237 | private ObjectDeselect handlerObjectDetach = null; |
@@ -916,6 +919,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
916 | public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; | 919 | public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; |
917 | public event EstateDebugRegionRequest OnEstateDebugRegionRequest; | 920 | public event EstateDebugRegionRequest OnEstateDebugRegionRequest; |
918 | public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; | 921 | public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; |
922 | public event RegionHandleRequest OnRegionHandleRequest; | ||
923 | public event ParcelInfoRequest OnParcelInfoRequest; | ||
919 | public event ScriptReset OnScriptReset; | 924 | public event ScriptReset OnScriptReset; |
920 | public event GetScriptRunning OnGetScriptRunning; | 925 | public event GetScriptRunning OnGetScriptRunning; |
921 | public event SetScriptRunning OnSetScriptRunning; | 926 | public event SetScriptRunning OnSetScriptRunning; |
@@ -5296,6 +5301,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5296 | 5301 | ||
5297 | #region Parcel related packets | 5302 | #region Parcel related packets |
5298 | 5303 | ||
5304 | case PacketType.RegionHandleRequest: | ||
5305 | RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; | ||
5306 | |||
5307 | handlerRegionHandleRequest = OnRegionHandleRequest; | ||
5308 | if (handlerRegionHandleRequest != null) | ||
5309 | { | ||
5310 | handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID); | ||
5311 | } | ||
5312 | break; | ||
5313 | |||
5314 | case PacketType.ParcelInfoRequest: | ||
5315 | ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack; | ||
5316 | |||
5317 | handlerParcelInfoRequest = OnParcelInfoRequest; | ||
5318 | if (handlerParcelInfoRequest != null) | ||
5319 | { | ||
5320 | handlerParcelInfoRequest(this, pirPack.Data.ParcelID); | ||
5321 | } | ||
5322 | break; | ||
5323 | |||
5299 | case PacketType.ParcelAccessListRequest: | 5324 | case PacketType.ParcelAccessListRequest: |
5300 | ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; | 5325 | ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack; |
5301 | 5326 | ||
@@ -6294,5 +6319,45 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6294 | } | 6319 | } |
6295 | 6320 | ||
6296 | #endregion | 6321 | #endregion |
6322 | |||
6323 | public void SendRegionHandle(LLUUID regionID, ulong handle) { | ||
6324 | RegionIDAndHandleReplyPacket reply = (RegionIDAndHandleReplyPacket)PacketPool.Instance.GetPacket(PacketType.RegionIDAndHandleReply); | ||
6325 | reply.ReplyBlock.RegionID = regionID; | ||
6326 | reply.ReplyBlock.RegionHandle = handle; | ||
6327 | OutPacket(reply, ThrottleOutPacketType.Land); | ||
6328 | } | ||
6329 | |||
6330 | public void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) | ||
6331 | { | ||
6332 | ParcelInfoReplyPacket reply = (ParcelInfoReplyPacket)PacketPool.Instance.GetPacket(PacketType.ParcelInfoReply); | ||
6333 | reply.AgentData.AgentID = m_agentId; | ||
6334 | reply.Data.ParcelID = parcelID; | ||
6335 | reply.Data.OwnerID = land.OwnerID; | ||
6336 | reply.Data.Name = Helpers.StringToField(land.Name); | ||
6337 | reply.Data.Desc = Helpers.StringToField(land.Description); | ||
6338 | reply.Data.ActualArea = land.Area; | ||
6339 | reply.Data.BillableArea = land.Area; // TODO: what is this? | ||
6340 | |||
6341 | // Bit 0: Mature, bit 7: on sale, other bits: no idea | ||
6342 | reply.Data.Flags = (byte)( | ||
6343 | ((land.Flags & (uint)Parcel.ParcelFlags.MaturePublish) != 0 ? (1 << 0) : 0) + | ||
6344 | ((land.Flags & (uint)Parcel.ParcelFlags.ForSale) != 0 ? (1 << 7) : 0)); | ||
6345 | |||
6346 | LLVector3 pos = land.UserLocation; | ||
6347 | if (pos.Equals(LLVector3.Zero)) | ||
6348 | { | ||
6349 | pos = (land.AABBMax + land.AABBMin) * 0.5f; | ||
6350 | } | ||
6351 | reply.Data.GlobalX = info.RegionLocX * Constants.RegionSize + x; | ||
6352 | reply.Data.GlobalY = info.RegionLocY * Constants.RegionSize + y; | ||
6353 | reply.Data.GlobalZ = pos.Z; | ||
6354 | reply.Data.SimName = Helpers.StringToField(info.RegionName); | ||
6355 | reply.Data.SnapshotID = land.SnapshotID; | ||
6356 | reply.Data.Dwell = 0; // TODO: not implemented yet | ||
6357 | reply.Data.SalePrice = land.SalePrice; | ||
6358 | reply.Data.AuctionID = (int)land.AuctionID; | ||
6359 | |||
6360 | OutPacket(reply, ThrottleOutPacketType.Land); | ||
6361 | } | ||
6297 | } | 6362 | } |
6298 | } | 6363 | } |