aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs4731
1 files changed, 4691 insertions, 40 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 47251b7..ac16b02 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -4307,15 +4307,168 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4307 AddLocalPacketHandler(PacketType.AgentRequestSit, HandleAgentRequestSit); 4307 AddLocalPacketHandler(PacketType.AgentRequestSit, HandleAgentRequestSit);
4308 AddLocalPacketHandler(PacketType.AgentSit, HandleAgentSit); 4308 AddLocalPacketHandler(PacketType.AgentSit, HandleAgentSit);
4309 AddLocalPacketHandler(PacketType.SoundTrigger, HandleSoundTrigger); 4309 AddLocalPacketHandler(PacketType.SoundTrigger, HandleSoundTrigger);
4310 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); 4310 AddLocalPacketHandler(PacketType.AvatarPickerRequest, HandleAvatarPickerRequest);
4311 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); 4311 AddLocalPacketHandler(PacketType.AgentDataUpdateRequest, HandleAgentDataUpdateRequest);
4312 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); 4312 AddLocalPacketHandler(PacketType.UserInfoRequest, HandleUserInfoRequest);
4313 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer); 4313 AddLocalPacketHandler(PacketType.UpdateUserInfo, HandleUpdateUserInfo);
4314 4314 AddLocalPacketHandler(PacketType.SetStartLocationRequest, HandleSetStartLocationRequest);
4315 AddLocalPacketHandler(PacketType.AgentThrottle, HandleAgentThrottle);
4316 AddLocalPacketHandler(PacketType.AgentPause, HandleAgentPause);
4317 AddLocalPacketHandler(PacketType.AgentResume, HandleAgentResume);
4318 AddLocalPacketHandler(PacketType.ForceScriptControlRelease, HandleForceScriptControlRelease);
4319 AddLocalPacketHandler(PacketType.ObjectLink, HandleObjectLink);
4320 AddLocalPacketHandler(PacketType.ObjectDelink, HandleObjectDelink);
4321 AddLocalPacketHandler(PacketType.ObjectAdd, HandleObjectAdd);
4322 AddLocalPacketHandler(PacketType.ObjectShape, HandleObjectShape);
4323 AddLocalPacketHandler(PacketType.ObjectExtraParams, HandleObjectExtraParams);
4324 AddLocalPacketHandler(PacketType.ObjectDuplicate, HandleObjectDuplicate);
4325 AddLocalPacketHandler(PacketType.RequestMultipleObjects, HandleRequestMultipleObjects);
4326 AddLocalPacketHandler(PacketType.ObjectSelect, HandleObjectSelect);
4327 AddLocalPacketHandler(PacketType.ObjectDeselect, HandleObjectDeselect);
4328 AddLocalPacketHandler(PacketType.ObjectPosition, HandleObjectPosition);
4329 AddLocalPacketHandler(PacketType.ObjectScale, HandleObjectScale);
4330 AddLocalPacketHandler(PacketType.ObjectRotation, HandleObjectRotation);
4331 AddLocalPacketHandler(PacketType.ObjectFlagUpdate, HandleObjectFlagUpdate);
4332 AddLocalPacketHandler(PacketType.ObjectImage, HandleObjectImage);
4333 AddLocalPacketHandler(PacketType.ObjectGrab, HandleObjectGrab);
4334 AddLocalPacketHandler(PacketType.ObjectGrabUpdate, HandleObjectGrabUpdate);
4335 AddLocalPacketHandler(PacketType.ObjectDeGrab, HandleObjectDeGrab);
4336 AddLocalPacketHandler(PacketType.ObjectSpinStart, HandleObjectSpinStart);
4337 AddLocalPacketHandler(PacketType.ObjectSpinUpdate, HandleObjectSpinUpdate);
4338 AddLocalPacketHandler(PacketType.ObjectSpinStop, HandleObjectSpinStop);
4339 AddLocalPacketHandler(PacketType.ObjectDescription, HandleObjectDescription);
4340 AddLocalPacketHandler(PacketType.ObjectName, HandleObjectName);
4341 AddLocalPacketHandler(PacketType.ObjectPermissions, HandleObjectPermissions);
4342 AddLocalPacketHandler(PacketType.Undo, HandleUndo);
4343 AddLocalPacketHandler(PacketType.ObjectDuplicateOnRay, HandleObjectDuplicateOnRay);
4344 AddLocalPacketHandler(PacketType.RequestObjectPropertiesFamily, HandleRequestObjectPropertiesFamily);
4345 AddLocalPacketHandler(PacketType.ObjectIncludeInSearch, HandleObjectIncludeInSearch);
4346 AddLocalPacketHandler(PacketType.ScriptAnswerYes, HandleScriptAnswerYes);
4347 AddLocalPacketHandler(PacketType.ObjectClickAction, HandleObjectClickAction);
4348 AddLocalPacketHandler(PacketType.ObjectMaterial, HandleObjectMaterial);
4349 AddLocalPacketHandler(PacketType.RequestImage, HandleRequestImage);
4350 AddLocalPacketHandler(PacketType.TransferRequest, HandleTransferRequest);
4351 AddLocalPacketHandler(PacketType.AssetUploadRequest, HandleAssetUploadRequest);
4352 AddLocalPacketHandler(PacketType.RequestXfer, HandleRequestXfer);
4353 AddLocalPacketHandler(PacketType.SendXferPacket, HandleSendXferPacket);
4354 AddLocalPacketHandler(PacketType.ConfirmXferPacket, HandleConfirmXferPacket);
4355 AddLocalPacketHandler(PacketType.AbortXfer, HandleAbortXfer);
4356 AddLocalPacketHandler(PacketType.CreateInventoryFolder, HandleCreateInventoryFolder);
4357 AddLocalPacketHandler(PacketType.UpdateInventoryFolder, HandleUpdateInventoryFolder);
4358 AddLocalPacketHandler(PacketType.MoveInventoryFolder, HandleMoveInventoryFolder);
4359 AddLocalPacketHandler(PacketType.CreateInventoryItem, HandleCreateInventoryItem);
4360 AddLocalPacketHandler(PacketType.FetchInventory, HandleFetchInventory);
4361 AddLocalPacketHandler(PacketType.FetchInventoryDescendents, HandleFetchInventoryDescendents);
4362 AddLocalPacketHandler(PacketType.PurgeInventoryDescendents, HandlePurgeInventoryDescendents);
4363 AddLocalPacketHandler(PacketType.UpdateInventoryItem, HandleUpdateInventoryItem);
4364 AddLocalPacketHandler(PacketType.CopyInventoryItem, HandleCopyInventoryItem);
4365 AddLocalPacketHandler(PacketType.MoveInventoryItem, HandleMoveInventoryItem);
4366 AddLocalPacketHandler(PacketType.RemoveInventoryItem, HandleRemoveInventoryItem);
4367 AddLocalPacketHandler(PacketType.RemoveInventoryFolder, HandleRemoveInventoryFolder);
4368 AddLocalPacketHandler(PacketType.RemoveInventoryObjects, HandleRemoveInventoryObjects);
4369 AddLocalPacketHandler(PacketType.RequestTaskInventory, HandleRequestTaskInventory);
4370 AddLocalPacketHandler(PacketType.UpdateTaskInventory, HandleUpdateTaskInventory);
4371 AddLocalPacketHandler(PacketType.RemoveTaskInventory, HandleRemoveTaskInventory);
4372 AddLocalPacketHandler(PacketType.MoveTaskInventory, HandleMoveTaskInventory);
4373 AddLocalPacketHandler(PacketType.RezScript, HandleRezScript);
4374 AddLocalPacketHandler(PacketType.MapLayerRequest, HandleMapLayerRequest);
4375 AddLocalPacketHandler(PacketType.MapBlockRequest, HandleMapBlockRequest);
4376 AddLocalPacketHandler(PacketType.MapNameRequest, HandleMapNameRequest);
4377 AddLocalPacketHandler(PacketType.TeleportLandmarkRequest, HandleTeleportLandmarkRequest);
4378 AddLocalPacketHandler(PacketType.TeleportLocationRequest, HandleTeleportLocationRequest);
4379 AddLocalPacketHandler(PacketType.UUIDNameRequest, HandleUUIDNameRequest);
4380 AddLocalPacketHandler(PacketType.RegionHandleRequest, HandleRegionHandleRequest);
4381 AddLocalPacketHandler(PacketType.ParcelInfoRequest, HandleParcelInfoRequest);
4382 AddLocalPacketHandler(PacketType.ParcelAccessListRequest, HandleParcelAccessListRequest);
4383 AddLocalPacketHandler(PacketType.ParcelAccessListUpdate, HandleParcelAccessListUpdate);
4384 AddLocalPacketHandler(PacketType.ParcelPropertiesRequest, HandleParcelPropertiesRequest);
4385 AddLocalPacketHandler(PacketType.ParcelDivide, HandleParcelDivide);
4386 AddLocalPacketHandler(PacketType.ParcelJoin, HandleParcelJoin);
4387 AddLocalPacketHandler(PacketType.ParcelPropertiesUpdate, HandleParcelPropertiesUpdate);
4388 AddLocalPacketHandler(PacketType.ParcelSelectObjects, HandleParcelSelectObjects);
4389 AddLocalPacketHandler(PacketType.ParcelObjectOwnersRequest, HandleParcelObjectOwnersRequest);
4390 AddLocalPacketHandler(PacketType.ParcelGodForceOwner, HandleParcelGodForceOwner);
4391 AddLocalPacketHandler(PacketType.ParcelRelease, HandleParcelRelease);
4392 AddLocalPacketHandler(PacketType.ParcelReclaim, HandleParcelReclaim);
4393 AddLocalPacketHandler(PacketType.ParcelReturnObjects, HandleParcelReturnObjects);
4394 AddLocalPacketHandler(PacketType.ParcelSetOtherCleanTime, HandleParcelSetOtherCleanTime);
4395 AddLocalPacketHandler(PacketType.LandStatRequest, HandleLandStatRequest);
4396 AddLocalPacketHandler(PacketType.ParcelDwellRequest, HandleParcelDwellRequest);
4397 AddLocalPacketHandler(PacketType.EstateOwnerMessage, HandleEstateOwnerMessage);
4398 AddLocalPacketHandler(PacketType.RequestRegionInfo, HandleRequestRegionInfo);
4399 AddLocalPacketHandler(PacketType.EstateCovenantRequest, HandleEstateCovenantRequest);
4400 AddLocalPacketHandler(PacketType.RequestGodlikePowers, HandleRequestGodlikePowers);
4401 AddLocalPacketHandler(PacketType.GodKickUser, HandleGodKickUser);
4402 AddLocalPacketHandler(PacketType.MoneyBalanceRequest, HandleMoneyBalanceRequest);
4403 AddLocalPacketHandler(PacketType.EconomyDataRequest, HandleEconomyDataRequest);
4404 AddLocalPacketHandler(PacketType.RequestPayPrice, HandleRequestPayPrice);
4405 AddLocalPacketHandler(PacketType.ObjectSaleInfo, HandleObjectSaleInfo);
4406 AddLocalPacketHandler(PacketType.ObjectBuy, HandleObjectBuy);
4407 AddLocalPacketHandler(PacketType.GetScriptRunning, HandleGetScriptRunning);
4408 AddLocalPacketHandler(PacketType.SetScriptRunning, HandleSetScriptRunning);
4409 AddLocalPacketHandler(PacketType.ScriptReset, HandleScriptReset);
4410 AddLocalPacketHandler(PacketType.ActivateGestures, HandleActivateGestures);
4411 AddLocalPacketHandler(PacketType.DeactivateGestures, HandleDeactivateGestures);
4412 AddLocalPacketHandler(PacketType.ObjectOwner, HandleObjectOwner);
4413 AddLocalPacketHandler(PacketType.AgentFOV, HandleAgentFOV);
4414 AddLocalPacketHandler(PacketType.ViewerStats, HandleViewerStats);
4415 AddLocalPacketHandler(PacketType.MapItemRequest, HandleMapItemRequest);
4416 AddLocalPacketHandler(PacketType.TransferAbort, HandleTransferAbort);
4417 AddLocalPacketHandler(PacketType.MuteListRequest, HandleMuteListRequest);
4418 AddLocalPacketHandler(PacketType.UseCircuitCode, HandleUseCircuitCode);
4419 AddLocalPacketHandler(PacketType.AgentHeightWidth, HandleAgentHeightWidth);
4420 AddLocalPacketHandler(PacketType.InventoryDescendents, HandleInventoryDescendents);
4421 AddLocalPacketHandler(PacketType.DirPlacesQuery, HandleDirPlacesQuery);
4422 AddLocalPacketHandler(PacketType.DirFindQuery, HandleDirFindQuery);
4423 AddLocalPacketHandler(PacketType.DirLandQuery, HandleDirLandQuery);
4424 AddLocalPacketHandler(PacketType.DirPopularQuery, HandleDirPopularQuery);
4425 AddLocalPacketHandler(PacketType.DirClassifiedQuery, HandleDirClassifiedQuery);
4426 AddLocalPacketHandler(PacketType.EventInfoRequest, HandleEventInfoRequest);
4427 AddLocalPacketHandler(PacketType.OfferCallingCard, HandleOfferCallingCard);
4428 AddLocalPacketHandler(PacketType.AcceptCallingCard, HandleAcceptCallingCard);
4429 AddLocalPacketHandler(PacketType.DeclineCallingCard, HandleDeclineCallingCard);
4430 AddLocalPacketHandler(PacketType.ActivateGroup, HandleActivateGroup);
4431 AddLocalPacketHandler(PacketType.GroupTitlesRequest, HandleGroupTitlesRequest);
4432 AddLocalPacketHandler(PacketType.GroupProfileRequest, HandleGroupProfileRequest);
4433 AddLocalPacketHandler(PacketType.GroupMembersRequest, HandleGroupMembersRequest);
4434 AddLocalPacketHandler(PacketType.GroupRoleDataRequest, HandleGroupRoleDataRequest);
4435 AddLocalPacketHandler(PacketType.GroupRoleMembersRequest, HandleGroupRoleMembersRequest);
4436 AddLocalPacketHandler(PacketType.CreateGroupRequest, HandleCreateGroupRequest);
4437 AddLocalPacketHandler(PacketType.UpdateGroupInfo, HandleUpdateGroupInfo);
4438 AddLocalPacketHandler(PacketType.SetGroupAcceptNotices, HandleSetGroupAcceptNotices);
4439 AddLocalPacketHandler(PacketType.GroupTitleUpdate, HandleGroupTitleUpdate);
4440 AddLocalPacketHandler(PacketType.ParcelDeedToGroup, HandleParcelDeedToGroup);
4441 AddLocalPacketHandler(PacketType.GroupNoticesListRequest, HandleGroupNoticesListRequest);
4442 AddLocalPacketHandler(PacketType.GroupNoticeRequest, HandleGroupNoticeRequest);
4443 AddLocalPacketHandler(PacketType.GroupRoleUpdate, HandleGroupRoleUpdate);
4444 AddLocalPacketHandler(PacketType.GroupRoleChanges, HandleGroupRoleChanges);
4445 AddLocalPacketHandler(PacketType.JoinGroupRequest, HandleJoinGroupRequest);
4446 AddLocalPacketHandler(PacketType.LeaveGroupRequest, HandleLeaveGroupRequest);
4447 AddLocalPacketHandler(PacketType.EjectGroupMemberRequest, HandleEjectGroupMemberRequest);
4448 AddLocalPacketHandler(PacketType.InviteGroupRequest, HandleInviteGroupRequest);
4449 AddLocalPacketHandler(PacketType.StartLure, HandleStartLure);
4450 AddLocalPacketHandler(PacketType.TeleportLureRequest, HandleTeleportLureRequest);
4451 AddLocalPacketHandler(PacketType.ClassifiedInfoRequest, HandleClassifiedInfoRequest);
4452 AddLocalPacketHandler(PacketType.ClassifiedInfoUpdate, HandleClassifiedInfoUpdate);
4453 AddLocalPacketHandler(PacketType.ClassifiedDelete, HandleClassifiedDelete);
4454 AddLocalPacketHandler(PacketType.ClassifiedGodDelete, HandleClassifiedGodDelete);
4455 AddLocalPacketHandler(PacketType.EventGodDelete, HandleEventGodDelete);
4456 AddLocalPacketHandler(PacketType.EventNotificationAddRequest, HandleEventNotificationAddRequest);
4457 AddLocalPacketHandler(PacketType.EventNotificationRemoveRequest, HandleEventNotificationRemoveRequest);
4458 AddLocalPacketHandler(PacketType.RetrieveInstantMessages, HandleRetrieveInstantMessages);
4459 AddLocalPacketHandler(PacketType.PickDelete, HandlePickDelete);
4460 AddLocalPacketHandler(PacketType.PickGodDelete, HandlePickGodDelete);
4461 AddLocalPacketHandler(PacketType.PickInfoUpdate, HandlePickInfoUpdate);
4462 AddLocalPacketHandler(PacketType.AvatarNotesUpdate, HandleAvatarNotesUpdate);
4463 AddLocalPacketHandler(PacketType.AvatarInterestsUpdate, HandleAvatarInterestsUpdate);
4464 AddLocalPacketHandler(PacketType.GrantUserRights, HandleGrantUserRights);
4465 AddLocalPacketHandler(PacketType.PlacesQuery, HandlePlacesQuery);
4315 } 4466 }
4316 4467
4317 #region Packet Handlers 4468 #region Packet Handlers
4318 4469
4470 #region Scene/Avatar
4471
4319 private bool HandleAgentUpdate(IClientAPI sener, Packet Pack) 4472 private bool HandleAgentUpdate(IClientAPI sener, Packet Pack)
4320 { 4473 {
4321 if (OnAgentUpdate != null) 4474 if (OnAgentUpdate != null)
@@ -5243,6 +5396,4432 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5243 return true; 5396 return true;
5244 } 5397 }
5245 5398
5399 private bool HandleAvatarPickerRequest(IClientAPI sender, Packet Pack)
5400 {
5401 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
5402
5403 #region Packet Session and User Check
5404 if (m_checkPackets)
5405 {
5406 if (avRequestQuery.AgentData.SessionID != SessionId ||
5407 avRequestQuery.AgentData.AgentID != AgentId)
5408 return true;
5409 }
5410 #endregion
5411
5412 AvatarPickerRequestPacket.AgentDataBlock Requestdata = avRequestQuery.AgentData;
5413 AvatarPickerRequestPacket.DataBlock querydata = avRequestQuery.Data;
5414 //m_log.Debug("Agent Sends:" + Utils.BytesToString(querydata.Name));
5415
5416 AvatarPickerRequest handlerAvatarPickerRequest = OnAvatarPickerRequest;
5417 if (handlerAvatarPickerRequest != null)
5418 {
5419 handlerAvatarPickerRequest(this, Requestdata.AgentID, Requestdata.QueryID,
5420 Utils.BytesToString(querydata.Name));
5421 }
5422 return true;
5423 }
5424
5425 private bool HandleAgentDataUpdateRequest(IClientAPI sender, Packet Pack)
5426 {
5427 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack;
5428
5429 #region Packet Session and User Check
5430 if (m_checkPackets)
5431 {
5432 if (avRequestDataUpdatePacket.AgentData.SessionID != SessionId ||
5433 avRequestDataUpdatePacket.AgentData.AgentID != AgentId)
5434 return true;
5435 }
5436 #endregion
5437
5438 FetchInventory handlerAgentDataUpdateRequest = OnAgentDataUpdateRequest;
5439
5440 if (handlerAgentDataUpdateRequest != null)
5441 {
5442 handlerAgentDataUpdateRequest(this, avRequestDataUpdatePacket.AgentData.AgentID, avRequestDataUpdatePacket.AgentData.SessionID);
5443 }
5444
5445 return true;
5446 }
5447
5448 private bool HandleUserInfoRequest(IClientAPI sender, Packet Pack)
5449 {
5450 UserInfoRequest handlerUserInfoRequest = OnUserInfoRequest;
5451 if (handlerUserInfoRequest != null)
5452 {
5453 handlerUserInfoRequest(this);
5454 }
5455 else
5456 {
5457 SendUserInfoReply(false, true, "");
5458 }
5459 return true;
5460
5461 }
5462
5463 private bool HandleUpdateUserInfo(IClientAPI sender, Packet Pack)
5464 {
5465 UpdateUserInfoPacket updateUserInfo = (UpdateUserInfoPacket)Pack;
5466
5467 #region Packet Session and User Check
5468 if (m_checkPackets)
5469 {
5470 if (updateUserInfo.AgentData.SessionID != SessionId ||
5471 updateUserInfo.AgentData.AgentID != AgentId)
5472 return true;
5473 }
5474 #endregion
5475
5476 UpdateUserInfo handlerUpdateUserInfo = OnUpdateUserInfo;
5477 if (handlerUpdateUserInfo != null)
5478 {
5479 bool visible = true;
5480 string DirectoryVisibility =
5481 Utils.BytesToString(updateUserInfo.UserData.DirectoryVisibility);
5482 if (DirectoryVisibility == "hidden")
5483 visible = false;
5484
5485 handlerUpdateUserInfo(
5486 updateUserInfo.UserData.IMViaEMail,
5487 visible, this);
5488 }
5489 return true;
5490 }
5491
5492 private bool HandleSetStartLocationRequest(IClientAPI sender, Packet Pack)
5493 {
5494 SetStartLocationRequestPacket avSetStartLocationRequestPacket = (SetStartLocationRequestPacket)Pack;
5495
5496 #region Packet Session and User Check
5497 if (m_checkPackets)
5498 {
5499 if (avSetStartLocationRequestPacket.AgentData.SessionID != SessionId ||
5500 avSetStartLocationRequestPacket.AgentData.AgentID != AgentId)
5501 return true;
5502 }
5503 #endregion
5504
5505 if (avSetStartLocationRequestPacket.AgentData.AgentID == AgentId && avSetStartLocationRequestPacket.AgentData.SessionID == SessionId)
5506 {
5507 TeleportLocationRequest handlerSetStartLocationRequest = OnSetStartLocationRequest;
5508 if (handlerSetStartLocationRequest != null)
5509 {
5510 handlerSetStartLocationRequest(this, 0, avSetStartLocationRequestPacket.StartLocationData.LocationPos,
5511 avSetStartLocationRequestPacket.StartLocationData.LocationLookAt,
5512 avSetStartLocationRequestPacket.StartLocationData.LocationID);
5513 }
5514 }
5515 return true;
5516 }
5517
5518 private bool HandleAgentThrottle(IClientAPI sender, Packet Pack)
5519 {
5520 AgentThrottlePacket atpack = (AgentThrottlePacket)Pack;
5521
5522 #region Packet Session and User Check
5523 if (m_checkPackets)
5524 {
5525 if (atpack.AgentData.SessionID != SessionId ||
5526 atpack.AgentData.AgentID != AgentId)
5527 return true;
5528 }
5529 #endregion
5530
5531 m_udpClient.SetThrottles(atpack.Throttle.Throttles);
5532 return true;
5533 }
5534
5535 private bool HandleAgentPause(IClientAPI sender, Packet Pack)
5536 {
5537 m_udpClient.IsPaused = true;
5538 return true;
5539 }
5540
5541 private bool HandleAgentResume(IClientAPI sender, Packet Pack)
5542 {
5543 m_udpClient.IsPaused = false;
5544 SendStartPingCheck(m_udpClient.CurrentPingSequence++);
5545 return true;
5546 }
5547
5548 private bool HandleForceScriptControlRelease(IClientAPI sender, Packet Pack)
5549 {
5550 ForceReleaseControls handlerForceReleaseControls = OnForceReleaseControls;
5551 if (handlerForceReleaseControls != null)
5552 {
5553 handlerForceReleaseControls(this, AgentId);
5554 }
5555 return true;
5556 }
5557
5558 #endregion Scene/Avatar
5559
5560 #region Objects/m_sceneObjects
5561
5562 private bool HandleObjectLink(IClientAPI sender, Packet Pack)
5563 {
5564 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
5565
5566 #region Packet Session and User Check
5567 if (m_checkPackets)
5568 {
5569 if (link.AgentData.SessionID != SessionId ||
5570 link.AgentData.AgentID != AgentId)
5571 return true;
5572 }
5573 #endregion
5574
5575 uint parentprimid = 0;
5576 List<uint> childrenprims = new List<uint>();
5577 if (link.ObjectData.Length > 1)
5578 {
5579 parentprimid = link.ObjectData[0].ObjectLocalID;
5580
5581 for (int i = 1; i < link.ObjectData.Length; i++)
5582 {
5583 childrenprims.Add(link.ObjectData[i].ObjectLocalID);
5584 }
5585 }
5586 LinkObjects handlerLinkObjects = OnLinkObjects;
5587 if (handlerLinkObjects != null)
5588 {
5589 handlerLinkObjects(this, parentprimid, childrenprims);
5590 }
5591 return true;
5592 }
5593
5594 private bool HandleObjectDelink(IClientAPI sender, Packet Pack)
5595 {
5596 ObjectDelinkPacket delink = (ObjectDelinkPacket)Pack;
5597
5598 #region Packet Session and User Check
5599 if (m_checkPackets)
5600 {
5601 if (delink.AgentData.SessionID != SessionId ||
5602 delink.AgentData.AgentID != AgentId)
5603 return true;
5604 }
5605 #endregion
5606
5607 // It appears the prim at index 0 is not always the root prim (for
5608 // instance, when one prim of a link set has been edited independently
5609 // of the others). Therefore, we'll pass all the ids onto the delink
5610 // method for it to decide which is the root.
5611 List<uint> prims = new List<uint>();
5612 for (int i = 0; i < delink.ObjectData.Length; i++)
5613 {
5614 prims.Add(delink.ObjectData[i].ObjectLocalID);
5615 }
5616 DelinkObjects handlerDelinkObjects = OnDelinkObjects;
5617 if (handlerDelinkObjects != null)
5618 {
5619 handlerDelinkObjects(prims);
5620 }
5621
5622 return true;
5623 }
5624
5625 private bool HandleObjectAdd(IClientAPI sender, Packet Pack)
5626 {
5627 if (OnAddPrim != null)
5628 {
5629 ObjectAddPacket addPacket = (ObjectAddPacket)Pack;
5630
5631 #region Packet Session and User Check
5632 if (m_checkPackets)
5633 {
5634 if (addPacket.AgentData.SessionID != SessionId ||
5635 addPacket.AgentData.AgentID != AgentId)
5636 return true;
5637 }
5638 #endregion
5639
5640 PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket);
5641 // m_log.Info("[REZData]: " + addPacket.ToString());
5642 //BypassRaycast: 1
5643 //RayStart: <69.79469, 158.2652, 98.40343>
5644 //RayEnd: <61.97724, 141.995, 92.58341>
5645 //RayTargetID: 00000000-0000-0000-0000-000000000000
5646
5647 //Check to see if adding the prim is allowed; useful for any module wanting to restrict the
5648 //object from rezing initially
5649
5650 AddNewPrim handlerAddPrim = OnAddPrim;
5651 if (handlerAddPrim != null)
5652 handlerAddPrim(AgentId, ActiveGroupId, addPacket.ObjectData.RayEnd, addPacket.ObjectData.Rotation, shape, addPacket.ObjectData.BypassRaycast, addPacket.ObjectData.RayStart, addPacket.ObjectData.RayTargetID, addPacket.ObjectData.RayEndIsIntersection);
5653 }
5654 return true;
5655 }
5656
5657 private bool HandleObjectShape(IClientAPI sender, Packet Pack)
5658 {
5659 ObjectShapePacket shapePacket = (ObjectShapePacket)Pack;
5660
5661 #region Packet Session and User Check
5662 if (m_checkPackets)
5663 {
5664 if (shapePacket.AgentData.SessionID != SessionId ||
5665 shapePacket.AgentData.AgentID != AgentId)
5666 return true;
5667 }
5668 #endregion
5669
5670 UpdateShape handlerUpdatePrimShape = null;
5671 for (int i = 0; i < shapePacket.ObjectData.Length; i++)
5672 {
5673 handlerUpdatePrimShape = OnUpdatePrimShape;
5674 if (handlerUpdatePrimShape != null)
5675 {
5676 UpdateShapeArgs shapeData = new UpdateShapeArgs();
5677 shapeData.ObjectLocalID = shapePacket.ObjectData[i].ObjectLocalID;
5678 shapeData.PathBegin = shapePacket.ObjectData[i].PathBegin;
5679 shapeData.PathCurve = shapePacket.ObjectData[i].PathCurve;
5680 shapeData.PathEnd = shapePacket.ObjectData[i].PathEnd;
5681 shapeData.PathRadiusOffset = shapePacket.ObjectData[i].PathRadiusOffset;
5682 shapeData.PathRevolutions = shapePacket.ObjectData[i].PathRevolutions;
5683 shapeData.PathScaleX = shapePacket.ObjectData[i].PathScaleX;
5684 shapeData.PathScaleY = shapePacket.ObjectData[i].PathScaleY;
5685 shapeData.PathShearX = shapePacket.ObjectData[i].PathShearX;
5686 shapeData.PathShearY = shapePacket.ObjectData[i].PathShearY;
5687 shapeData.PathSkew = shapePacket.ObjectData[i].PathSkew;
5688 shapeData.PathTaperX = shapePacket.ObjectData[i].PathTaperX;
5689 shapeData.PathTaperY = shapePacket.ObjectData[i].PathTaperY;
5690 shapeData.PathTwist = shapePacket.ObjectData[i].PathTwist;
5691 shapeData.PathTwistBegin = shapePacket.ObjectData[i].PathTwistBegin;
5692 shapeData.ProfileBegin = shapePacket.ObjectData[i].ProfileBegin;
5693 shapeData.ProfileCurve = shapePacket.ObjectData[i].ProfileCurve;
5694 shapeData.ProfileEnd = shapePacket.ObjectData[i].ProfileEnd;
5695 shapeData.ProfileHollow = shapePacket.ObjectData[i].ProfileHollow;
5696
5697 handlerUpdatePrimShape(m_agentId, shapePacket.ObjectData[i].ObjectLocalID,
5698 shapeData);
5699 }
5700 }
5701 return true;
5702 }
5703
5704 private bool HandleObjectExtraParams(IClientAPI sender, Packet Pack)
5705 {
5706 ObjectExtraParamsPacket extraPar = (ObjectExtraParamsPacket)Pack;
5707
5708 #region Packet Session and User Check
5709 if (m_checkPackets)
5710 {
5711 if (extraPar.AgentData.SessionID != SessionId ||
5712 extraPar.AgentData.AgentID != AgentId)
5713 return true;
5714 }
5715 #endregion
5716
5717 ObjectExtraParams handlerUpdateExtraParams = OnUpdateExtraParams;
5718 if (handlerUpdateExtraParams != null)
5719 {
5720 for (int i = 0; i < extraPar.ObjectData.Length; i++)
5721 {
5722 handlerUpdateExtraParams(m_agentId, extraPar.ObjectData[i].ObjectLocalID,
5723 extraPar.ObjectData[i].ParamType,
5724 extraPar.ObjectData[i].ParamInUse, extraPar.ObjectData[i].ParamData);
5725 }
5726 }
5727 return true;
5728 }
5729
5730 private bool HandleObjectDuplicate(IClientAPI sender, Packet Pack)
5731 {
5732 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack;
5733
5734 #region Packet Session and User Check
5735 if (m_checkPackets)
5736 {
5737 if (dupe.AgentData.SessionID != SessionId ||
5738 dupe.AgentData.AgentID != AgentId)
5739 return true;
5740 }
5741 #endregion
5742
5743 ObjectDuplicatePacket.AgentDataBlock AgentandGroupData = dupe.AgentData;
5744
5745 ObjectDuplicate handlerObjectDuplicate = null;
5746
5747 for (int i = 0; i < dupe.ObjectData.Length; i++)
5748 {
5749 handlerObjectDuplicate = OnObjectDuplicate;
5750 if (handlerObjectDuplicate != null)
5751 {
5752 handlerObjectDuplicate(dupe.ObjectData[i].ObjectLocalID, dupe.SharedData.Offset,
5753 dupe.SharedData.DuplicateFlags, AgentandGroupData.AgentID,
5754 AgentandGroupData.GroupID);
5755 }
5756 }
5757
5758 return true;
5759 }
5760
5761 private bool HandleRequestMultipleObjects(IClientAPI sender, Packet Pack)
5762 {
5763 RequestMultipleObjectsPacket incomingRequest = (RequestMultipleObjectsPacket)Pack;
5764
5765 #region Packet Session and User Check
5766 if (m_checkPackets)
5767 {
5768 if (incomingRequest.AgentData.SessionID != SessionId ||
5769 incomingRequest.AgentData.AgentID != AgentId)
5770 return true;
5771 }
5772 #endregion
5773
5774 ObjectRequest handlerObjectRequest = null;
5775
5776 for (int i = 0; i < incomingRequest.ObjectData.Length; i++)
5777 {
5778 handlerObjectRequest = OnObjectRequest;
5779 if (handlerObjectRequest != null)
5780 {
5781 handlerObjectRequest(incomingRequest.ObjectData[i].ID, this);
5782 }
5783 }
5784 return true;
5785 }
5786
5787 private bool HandleObjectSelect(IClientAPI sender, Packet Pack)
5788 {
5789 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
5790
5791 #region Packet Session and User Check
5792 if (m_checkPackets)
5793 {
5794 if (incomingselect.AgentData.SessionID != SessionId ||
5795 incomingselect.AgentData.AgentID != AgentId)
5796 return true;
5797 }
5798 #endregion
5799
5800 ObjectSelect handlerObjectSelect = null;
5801
5802 for (int i = 0; i < incomingselect.ObjectData.Length; i++)
5803 {
5804 handlerObjectSelect = OnObjectSelect;
5805 if (handlerObjectSelect != null)
5806 {
5807 handlerObjectSelect(incomingselect.ObjectData[i].ObjectLocalID, this);
5808 }
5809 }
5810 return true;
5811 }
5812
5813 private bool HandleObjectDeselect(IClientAPI sender, Packet Pack)
5814 {
5815 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack;
5816
5817 #region Packet Session and User Check
5818 if (m_checkPackets)
5819 {
5820 if (incomingdeselect.AgentData.SessionID != SessionId ||
5821 incomingdeselect.AgentData.AgentID != AgentId)
5822 return true;
5823 }
5824 #endregion
5825
5826 ObjectDeselect handlerObjectDeselect = null;
5827
5828 for (int i = 0; i < incomingdeselect.ObjectData.Length; i++)
5829 {
5830 handlerObjectDeselect = OnObjectDeselect;
5831 if (handlerObjectDeselect != null)
5832 {
5833 OnObjectDeselect(incomingdeselect.ObjectData[i].ObjectLocalID, this);
5834 }
5835 }
5836 return true;
5837 }
5838
5839 private bool HandleObjectPosition(IClientAPI sender, Packet Pack)
5840 {
5841 // DEPRECATED: but till libsecondlife removes it, people will use it
5842 ObjectPositionPacket position = (ObjectPositionPacket)Pack;
5843
5844 #region Packet Session and User Check
5845 if (m_checkPackets)
5846 {
5847 if (position.AgentData.SessionID != SessionId ||
5848 position.AgentData.AgentID != AgentId)
5849 return true;
5850 }
5851 #endregion
5852
5853
5854 for (int i = 0; i < position.ObjectData.Length; i++)
5855 {
5856 UpdateVector handlerUpdateVector = OnUpdatePrimGroupPosition;
5857 if (handlerUpdateVector != null)
5858 handlerUpdateVector(position.ObjectData[i].ObjectLocalID, position.ObjectData[i].Position, this);
5859 }
5860
5861 return true;
5862 }
5863
5864 private bool HandleObjectScale(IClientAPI sender, Packet Pack)
5865 {
5866 // DEPRECATED: but till libsecondlife removes it, people will use it
5867 ObjectScalePacket scale = (ObjectScalePacket)Pack;
5868
5869 #region Packet Session and User Check
5870 if (m_checkPackets)
5871 {
5872 if (scale.AgentData.SessionID != SessionId ||
5873 scale.AgentData.AgentID != AgentId)
5874 return true;
5875 }
5876 #endregion
5877
5878 for (int i = 0; i < scale.ObjectData.Length; i++)
5879 {
5880 UpdateVector handlerUpdatePrimGroupScale = OnUpdatePrimGroupScale;
5881 if (handlerUpdatePrimGroupScale != null)
5882 handlerUpdatePrimGroupScale(scale.ObjectData[i].ObjectLocalID, scale.ObjectData[i].Scale, this);
5883 }
5884
5885 return true;
5886 }
5887
5888 private bool HandleObjectRotation(IClientAPI sender, Packet Pack)
5889 {
5890 // DEPRECATED: but till libsecondlife removes it, people will use it
5891 ObjectRotationPacket rotation = (ObjectRotationPacket)Pack;
5892
5893 #region Packet Session and User Check
5894 if (m_checkPackets)
5895 {
5896 if (rotation.AgentData.SessionID != SessionId ||
5897 rotation.AgentData.AgentID != AgentId)
5898 return true;
5899 }
5900 #endregion
5901
5902 for (int i = 0; i < rotation.ObjectData.Length; i++)
5903 {
5904 UpdatePrimRotation handlerUpdatePrimRotation = OnUpdatePrimGroupRotation;
5905 if (handlerUpdatePrimRotation != null)
5906 handlerUpdatePrimRotation(rotation.ObjectData[i].ObjectLocalID, rotation.ObjectData[i].Rotation, this);
5907 }
5908
5909 return true;
5910 }
5911
5912 private bool HandleObjectFlagUpdate(IClientAPI sender, Packet Pack)
5913 {
5914 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack;
5915
5916 #region Packet Session and User Check
5917 if (m_checkPackets)
5918 {
5919 if (flags.AgentData.SessionID != SessionId ||
5920 flags.AgentData.AgentID != AgentId)
5921 return true;
5922 }
5923 #endregion
5924
5925 UpdatePrimFlags handlerUpdatePrimFlags = OnUpdatePrimFlags;
5926
5927 if (handlerUpdatePrimFlags != null)
5928 {
5929 byte[] data = Pack.ToBytes();
5930 // 46,47,48 are special positions within the packet
5931 // This may change so perhaps we need a better way
5932 // of storing this (OMV.FlagUpdatePacket.UsePhysics,etc?)
5933 bool UsePhysics = (data[46] != 0) ? true : false;
5934 bool IsTemporary = (data[47] != 0) ? true : false;
5935 bool IsPhantom = (data[48] != 0) ? true : false;
5936 handlerUpdatePrimFlags(flags.AgentData.ObjectLocalID, UsePhysics, IsTemporary, IsPhantom, this);
5937 }
5938 return true;
5939 }
5940
5941 private bool HandleObjectImage(IClientAPI sender, Packet Pack)
5942 {
5943 ObjectImagePacket imagePack = (ObjectImagePacket)Pack;
5944
5945 UpdatePrimTexture handlerUpdatePrimTexture = null;
5946 for (int i = 0; i < imagePack.ObjectData.Length; i++)
5947 {
5948 handlerUpdatePrimTexture = OnUpdatePrimTexture;
5949 if (handlerUpdatePrimTexture != null)
5950 {
5951 handlerUpdatePrimTexture(imagePack.ObjectData[i].ObjectLocalID,
5952 imagePack.ObjectData[i].TextureEntry, this);
5953 }
5954 }
5955 return true;
5956 }
5957
5958 private bool HandleObjectGrab(IClientAPI sender, Packet Pack)
5959 {
5960 ObjectGrabPacket grab = (ObjectGrabPacket)Pack;
5961
5962 #region Packet Session and User Check
5963 if (m_checkPackets)
5964 {
5965 if (grab.AgentData.SessionID != SessionId ||
5966 grab.AgentData.AgentID != AgentId)
5967 return true;
5968 }
5969 #endregion
5970
5971 GrabObject handlerGrabObject = OnGrabObject;
5972
5973 if (handlerGrabObject != null)
5974 {
5975 List<SurfaceTouchEventArgs> touchArgs = new List<SurfaceTouchEventArgs>();
5976 if ((grab.SurfaceInfo != null) && (grab.SurfaceInfo.Length > 0))
5977 {
5978 foreach (ObjectGrabPacket.SurfaceInfoBlock surfaceInfo in grab.SurfaceInfo)
5979 {
5980 SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs();
5981 arg.Binormal = surfaceInfo.Binormal;
5982 arg.FaceIndex = surfaceInfo.FaceIndex;
5983 arg.Normal = surfaceInfo.Normal;
5984 arg.Position = surfaceInfo.Position;
5985 arg.STCoord = surfaceInfo.STCoord;
5986 arg.UVCoord = surfaceInfo.UVCoord;
5987 touchArgs.Add(arg);
5988 }
5989 }
5990 handlerGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this, touchArgs);
5991 }
5992 return true;
5993 }
5994
5995 private bool HandleObjectGrabUpdate(IClientAPI sender, Packet Pack)
5996 {
5997 ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack;
5998
5999 #region Packet Session and User Check
6000 if (m_checkPackets)
6001 {
6002 if (grabUpdate.AgentData.SessionID != SessionId ||
6003 grabUpdate.AgentData.AgentID != AgentId)
6004 return true;
6005 }
6006 #endregion
6007
6008 MoveObject handlerGrabUpdate = OnGrabUpdate;
6009
6010 if (handlerGrabUpdate != null)
6011 {
6012 List<SurfaceTouchEventArgs> touchArgs = new List<SurfaceTouchEventArgs>();
6013 if ((grabUpdate.SurfaceInfo != null) && (grabUpdate.SurfaceInfo.Length > 0))
6014 {
6015 foreach (ObjectGrabUpdatePacket.SurfaceInfoBlock surfaceInfo in grabUpdate.SurfaceInfo)
6016 {
6017 SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs();
6018 arg.Binormal = surfaceInfo.Binormal;
6019 arg.FaceIndex = surfaceInfo.FaceIndex;
6020 arg.Normal = surfaceInfo.Normal;
6021 arg.Position = surfaceInfo.Position;
6022 arg.STCoord = surfaceInfo.STCoord;
6023 arg.UVCoord = surfaceInfo.UVCoord;
6024 touchArgs.Add(arg);
6025 }
6026 }
6027 handlerGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial,
6028 grabUpdate.ObjectData.GrabPosition, this, touchArgs);
6029 }
6030 return true;
6031 }
6032
6033 private bool HandleObjectDeGrab(IClientAPI sender, Packet Pack)
6034 {
6035 ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack;
6036
6037 #region Packet Session and User Check
6038 if (m_checkPackets)
6039 {
6040 if (deGrab.AgentData.SessionID != SessionId ||
6041 deGrab.AgentData.AgentID != AgentId)
6042 return true;
6043 }
6044 #endregion
6045
6046 DeGrabObject handlerDeGrabObject = OnDeGrabObject;
6047 if (handlerDeGrabObject != null)
6048 {
6049 List<SurfaceTouchEventArgs> touchArgs = new List<SurfaceTouchEventArgs>();
6050 if ((deGrab.SurfaceInfo != null) && (deGrab.SurfaceInfo.Length > 0))
6051 {
6052 foreach (ObjectDeGrabPacket.SurfaceInfoBlock surfaceInfo in deGrab.SurfaceInfo)
6053 {
6054 SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs();
6055 arg.Binormal = surfaceInfo.Binormal;
6056 arg.FaceIndex = surfaceInfo.FaceIndex;
6057 arg.Normal = surfaceInfo.Normal;
6058 arg.Position = surfaceInfo.Position;
6059 arg.STCoord = surfaceInfo.STCoord;
6060 arg.UVCoord = surfaceInfo.UVCoord;
6061 touchArgs.Add(arg);
6062 }
6063 }
6064 handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs);
6065 }
6066 return true;
6067 }
6068
6069 private bool HandleObjectSpinStart(IClientAPI sender, Packet Pack)
6070 {
6071 //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet");
6072 ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack;
6073
6074 #region Packet Session and User Check
6075 if (m_checkPackets)
6076 {
6077 if (spinStart.AgentData.SessionID != SessionId ||
6078 spinStart.AgentData.AgentID != AgentId)
6079 return true;
6080 }
6081 #endregion
6082
6083 SpinStart handlerSpinStart = OnSpinStart;
6084 if (handlerSpinStart != null)
6085 {
6086 handlerSpinStart(spinStart.ObjectData.ObjectID, this);
6087 }
6088 return true;
6089 }
6090
6091 private bool HandleObjectSpinUpdate(IClientAPI sender, Packet Pack)
6092 {
6093 //m_log.Warn("[CLIENT]: unhandled ObjectSpinUpdate packet");
6094 ObjectSpinUpdatePacket spinUpdate = (ObjectSpinUpdatePacket)Pack;
6095
6096 #region Packet Session and User Check
6097 if (m_checkPackets)
6098 {
6099 if (spinUpdate.AgentData.SessionID != SessionId ||
6100 spinUpdate.AgentData.AgentID != AgentId)
6101 return true;
6102 }
6103 #endregion
6104
6105 Vector3 axis;
6106 float angle;
6107 spinUpdate.ObjectData.Rotation.GetAxisAngle(out axis, out angle);
6108 //m_log.Warn("[CLIENT]: ObjectSpinUpdate packet rot axis:" + axis + " angle:" + angle);
6109
6110 SpinObject handlerSpinUpdate = OnSpinUpdate;
6111 if (handlerSpinUpdate != null)
6112 {
6113 handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this);
6114 }
6115 return true;
6116 }
6117
6118 private bool HandleObjectSpinStop(IClientAPI sender, Packet Pack)
6119 {
6120 //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet");
6121 ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack;
6122
6123 #region Packet Session and User Check
6124 if (m_checkPackets)
6125 {
6126 if (spinStop.AgentData.SessionID != SessionId ||
6127 spinStop.AgentData.AgentID != AgentId)
6128 return true;
6129 }
6130 #endregion
6131
6132 SpinStop handlerSpinStop = OnSpinStop;
6133 if (handlerSpinStop != null)
6134 {
6135 handlerSpinStop(spinStop.ObjectData.ObjectID, this);
6136 }
6137 return true;
6138 }
6139
6140 private bool HandleObjectDescription(IClientAPI sender, Packet Pack)
6141 {
6142 ObjectDescriptionPacket objDes = (ObjectDescriptionPacket)Pack;
6143
6144 #region Packet Session and User Check
6145 if (m_checkPackets)
6146 {
6147 if (objDes.AgentData.SessionID != SessionId ||
6148 objDes.AgentData.AgentID != AgentId)
6149 return true;
6150 }
6151 #endregion
6152
6153 GenericCall7 handlerObjectDescription = null;
6154
6155 for (int i = 0; i < objDes.ObjectData.Length; i++)
6156 {
6157 handlerObjectDescription = OnObjectDescription;
6158 if (handlerObjectDescription != null)
6159 {
6160 handlerObjectDescription(this, objDes.ObjectData[i].LocalID,
6161 Util.FieldToString(objDes.ObjectData[i].Description));
6162 }
6163 }
6164 return true;
6165 }
6166
6167 private bool HandleObjectName(IClientAPI sender, Packet Pack)
6168 {
6169 ObjectNamePacket objName = (ObjectNamePacket)Pack;
6170
6171 #region Packet Session and User Check
6172 if (m_checkPackets)
6173 {
6174 if (objName.AgentData.SessionID != SessionId ||
6175 objName.AgentData.AgentID != AgentId)
6176 return true;
6177 }
6178 #endregion
6179
6180 GenericCall7 handlerObjectName = null;
6181 for (int i = 0; i < objName.ObjectData.Length; i++)
6182 {
6183 handlerObjectName = OnObjectName;
6184 if (handlerObjectName != null)
6185 {
6186 handlerObjectName(this, objName.ObjectData[i].LocalID,
6187 Util.FieldToString(objName.ObjectData[i].Name));
6188 }
6189 }
6190 return true;
6191 }
6192
6193 private bool HandleObjectPermissions(IClientAPI sender, Packet Pack)
6194 {
6195 if (OnObjectPermissions != null)
6196 {
6197 ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack;
6198
6199 #region Packet Session and User Check
6200 if (m_checkPackets)
6201 {
6202 if (newobjPerms.AgentData.SessionID != SessionId ||
6203 newobjPerms.AgentData.AgentID != AgentId)
6204 return true;
6205 }
6206 #endregion
6207
6208 UUID AgentID = newobjPerms.AgentData.AgentID;
6209 UUID SessionID = newobjPerms.AgentData.SessionID;
6210
6211 ObjectPermissions handlerObjectPermissions = null;
6212
6213 for (int i = 0; i < newobjPerms.ObjectData.Length; i++)
6214 {
6215 ObjectPermissionsPacket.ObjectDataBlock permChanges = newobjPerms.ObjectData[i];
6216
6217 byte field = permChanges.Field;
6218 uint localID = permChanges.ObjectLocalID;
6219 uint mask = permChanges.Mask;
6220 byte set = permChanges.Set;
6221
6222 handlerObjectPermissions = OnObjectPermissions;
6223
6224 if (handlerObjectPermissions != null)
6225 handlerObjectPermissions(this, AgentID, SessionID, field, localID, mask, set);
6226 }
6227 }
6228
6229 // Here's our data,
6230 // PermField contains the field the info goes into
6231 // PermField determines which mask we're changing
6232 //
6233 // chmask is the mask of the change
6234 // setTF is whether we're adding it or taking it away
6235 //
6236 // objLocalID is the localID of the object.
6237
6238 // Unfortunately, we have to pass the event the packet because objData is an array
6239 // That means multiple object perms may be updated in a single packet.
6240
6241 return true;
6242 }
6243
6244 private bool HandleUndo(IClientAPI sender, Packet Pack)
6245 {
6246 UndoPacket undoitem = (UndoPacket)Pack;
6247
6248 #region Packet Session and User Check
6249 if (m_checkPackets)
6250 {
6251 if (undoitem.AgentData.SessionID != SessionId ||
6252 undoitem.AgentData.AgentID != AgentId)
6253 return true;
6254 }
6255 #endregion
6256
6257 if (undoitem.ObjectData.Length > 0)
6258 {
6259 for (int i = 0; i < undoitem.ObjectData.Length; i++)
6260 {
6261 UUID objiD = undoitem.ObjectData[i].ObjectID;
6262 AgentSit handlerOnUndo = OnUndo;
6263 if (handlerOnUndo != null)
6264 {
6265 handlerOnUndo(this, objiD);
6266 }
6267
6268 }
6269 }
6270 return true;
6271 }
6272
6273 private bool HandleObjectDuplicateOnRay(IClientAPI sender, Packet Pack)
6274 {
6275 ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack;
6276
6277 #region Packet Session and User Check
6278 if (m_checkPackets)
6279 {
6280 if (dupeOnRay.AgentData.SessionID != SessionId ||
6281 dupeOnRay.AgentData.AgentID != AgentId)
6282 return true;
6283 }
6284 #endregion
6285
6286 ObjectDuplicateOnRay handlerObjectDuplicateOnRay = null;
6287
6288 for (int i = 0; i < dupeOnRay.ObjectData.Length; i++)
6289 {
6290 handlerObjectDuplicateOnRay = OnObjectDuplicateOnRay;
6291 if (handlerObjectDuplicateOnRay != null)
6292 {
6293 handlerObjectDuplicateOnRay(dupeOnRay.ObjectData[i].ObjectLocalID, dupeOnRay.AgentData.DuplicateFlags,
6294 dupeOnRay.AgentData.AgentID, dupeOnRay.AgentData.GroupID, dupeOnRay.AgentData.RayTargetID, dupeOnRay.AgentData.RayEnd,
6295 dupeOnRay.AgentData.RayStart, dupeOnRay.AgentData.BypassRaycast, dupeOnRay.AgentData.RayEndIsIntersection,
6296 dupeOnRay.AgentData.CopyCenters, dupeOnRay.AgentData.CopyRotates);
6297 }
6298 }
6299
6300 return true;
6301 }
6302
6303 private bool HandleRequestObjectPropertiesFamily(IClientAPI sender, Packet Pack)
6304 {
6305 //This powers the little tooltip that appears when you move your mouse over an object
6306 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
6307
6308 #region Packet Session and User Check
6309 if (m_checkPackets)
6310 {
6311 if (packToolTip.AgentData.SessionID != SessionId ||
6312 packToolTip.AgentData.AgentID != AgentId)
6313 return true;
6314 }
6315 #endregion
6316
6317 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData;
6318
6319 RequestObjectPropertiesFamily handlerRequestObjectPropertiesFamily = OnRequestObjectPropertiesFamily;
6320
6321 if (handlerRequestObjectPropertiesFamily != null)
6322 {
6323 handlerRequestObjectPropertiesFamily(this, m_agentId, packObjBlock.RequestFlags,
6324 packObjBlock.ObjectID);
6325 }
6326
6327 return true;
6328 }
6329
6330 private bool HandleObjectIncludeInSearch(IClientAPI sender, Packet Pack)
6331 {
6332 //This lets us set objects to appear in search (stuff like DataSnapshot, etc)
6333 ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack;
6334 ObjectIncludeInSearch handlerObjectIncludeInSearch = null;
6335
6336 #region Packet Session and User Check
6337 if (m_checkPackets)
6338 {
6339 if (packInSearch.AgentData.SessionID != SessionId ||
6340 packInSearch.AgentData.AgentID != AgentId)
6341 return true;
6342 }
6343 #endregion
6344
6345 foreach (ObjectIncludeInSearchPacket.ObjectDataBlock objData in packInSearch.ObjectData)
6346 {
6347 bool inSearch = objData.IncludeInSearch;
6348 uint localID = objData.ObjectLocalID;
6349
6350 handlerObjectIncludeInSearch = OnObjectIncludeInSearch;
6351
6352 if (handlerObjectIncludeInSearch != null)
6353 {
6354 handlerObjectIncludeInSearch(this, inSearch, localID);
6355 }
6356 }
6357 return true;
6358 }
6359
6360 private bool HandleScriptAnswerYes(IClientAPI sender, Packet Pack)
6361 {
6362 ScriptAnswerYesPacket scriptAnswer = (ScriptAnswerYesPacket)Pack;
6363
6364 #region Packet Session and User Check
6365 if (m_checkPackets)
6366 {
6367 if (scriptAnswer.AgentData.SessionID != SessionId ||
6368 scriptAnswer.AgentData.AgentID != AgentId)
6369 return true;
6370 }
6371 #endregion
6372
6373 ScriptAnswer handlerScriptAnswer = OnScriptAnswer;
6374 if (handlerScriptAnswer != null)
6375 {
6376 handlerScriptAnswer(this, scriptAnswer.Data.TaskID, scriptAnswer.Data.ItemID, scriptAnswer.Data.Questions);
6377 }
6378 return true;
6379 }
6380
6381 private bool HandleObjectClickAction(IClientAPI sender, Packet Pack)
6382 {
6383 ObjectClickActionPacket ocpacket = (ObjectClickActionPacket)Pack;
6384
6385 #region Packet Session and User Check
6386 if (m_checkPackets)
6387 {
6388 if (ocpacket.AgentData.SessionID != SessionId ||
6389 ocpacket.AgentData.AgentID != AgentId)
6390 return true;
6391 }
6392 #endregion
6393
6394 GenericCall7 handlerObjectClickAction = OnObjectClickAction;
6395 if (handlerObjectClickAction != null)
6396 {
6397 foreach (ObjectClickActionPacket.ObjectDataBlock odata in ocpacket.ObjectData)
6398 {
6399 byte action = odata.ClickAction;
6400 uint localID = odata.ObjectLocalID;
6401 handlerObjectClickAction(this, localID, action.ToString());
6402 }
6403 }
6404 return true;
6405 }
6406
6407 private bool HandleObjectMaterial(IClientAPI sender, Packet Pack)
6408 {
6409 ObjectMaterialPacket ompacket = (ObjectMaterialPacket)Pack;
6410
6411 #region Packet Session and User Check
6412 if (m_checkPackets)
6413 {
6414 if (ompacket.AgentData.SessionID != SessionId ||
6415 ompacket.AgentData.AgentID != AgentId)
6416 return true;
6417 }
6418 #endregion
6419
6420 GenericCall7 handlerObjectMaterial = OnObjectMaterial;
6421 if (handlerObjectMaterial != null)
6422 {
6423 foreach (ObjectMaterialPacket.ObjectDataBlock odata in ompacket.ObjectData)
6424 {
6425 byte material = odata.Material;
6426 uint localID = odata.ObjectLocalID;
6427 handlerObjectMaterial(this, localID, material.ToString());
6428 }
6429 }
6430 return true;
6431 }
6432
6433 #endregion Objects/m_sceneObjects
6434
6435 #region Inventory/Asset/Other related packets
6436
6437 private bool HandleRequestImage(IClientAPI sender, Packet Pack)
6438 {
6439 RequestImagePacket imageRequest = (RequestImagePacket)Pack;
6440 //m_log.Debug("image request: " + Pack.ToString());
6441
6442 #region Packet Session and User Check
6443 if (m_checkPackets)
6444 {
6445 if (imageRequest.AgentData.SessionID != SessionId ||
6446 imageRequest.AgentData.AgentID != AgentId)
6447 return true;
6448 }
6449 #endregion
6450
6451 //handlerTextureRequest = null;
6452 for (int i = 0; i < imageRequest.RequestImage.Length; i++)
6453 {
6454 if (OnRequestTexture != null)
6455 {
6456 TextureRequestArgs args = new TextureRequestArgs();
6457
6458 RequestImagePacket.RequestImageBlock block = imageRequest.RequestImage[i];
6459
6460 args.RequestedAssetID = block.Image;
6461 args.DiscardLevel = block.DiscardLevel;
6462 args.PacketNumber = block.Packet;
6463 args.Priority = block.DownloadPriority;
6464 args.requestSequence = imageRequest.Header.Sequence;
6465
6466 // NOTE: This is not a built in part of the LLUDP protocol, but we double the
6467 // priority of avatar textures to get avatars rezzing in faster than the
6468 // surrounding scene
6469 if ((ImageType)block.Type == ImageType.Baked)
6470 args.Priority *= 2.0f;
6471
6472 //handlerTextureRequest = OnRequestTexture;
6473
6474 //if (handlerTextureRequest != null)
6475 //OnRequestTexture(this, args);
6476
6477 // in the end, we null this, so we have to check if it's null
6478 if (m_imageManager != null)
6479 {
6480 m_imageManager.EnqueueReq(args);
6481 }
6482 }
6483 }
6484 return true;
6485 }
6486
6487 private bool HandleTransferRequest(IClientAPI sender, Packet Pack)
6488 {
6489 //m_log.Debug("ClientView.ProcessPackets.cs:ProcessInPacket() - Got transfer request");
6490
6491 TransferRequestPacket transfer = (TransferRequestPacket)Pack;
6492 //m_log.Debug("Transfer Request: " + transfer.ToString());
6493 // Validate inventory transfers
6494 // Has to be done here, because AssetCache can't do it
6495 //
6496 UUID taskID = UUID.Zero;
6497 if (transfer.TransferInfo.SourceType == 3)
6498 {
6499 taskID = new UUID(transfer.TransferInfo.Params, 48);
6500 UUID itemID = new UUID(transfer.TransferInfo.Params, 64);
6501 UUID requestID = new UUID(transfer.TransferInfo.Params, 80);
6502 if (!(((Scene)m_scene).Permissions.BypassPermissions()))
6503 {
6504 if (taskID != UUID.Zero) // Prim
6505 {
6506 SceneObjectPart part = ((Scene)m_scene).GetSceneObjectPart(taskID);
6507 if (part == null)
6508 return true;
6509
6510 if (part.OwnerID != AgentId)
6511 return true;
6512
6513 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
6514 return true;
6515
6516 TaskInventoryItem ti = part.Inventory.GetInventoryItem(itemID);
6517 if (ti == null)
6518 return true;
6519
6520 if (ti.OwnerID != AgentId)
6521 return true;
6522
6523 if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
6524 return true;
6525
6526 if (ti.AssetID != requestID)
6527 return true;
6528 }
6529 else // Agent
6530 {
6531 IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>();
6532 InventoryItemBase assetRequestItem = new InventoryItemBase(itemID, AgentId);
6533 assetRequestItem = invService.GetItem(assetRequestItem);
6534 if (assetRequestItem == null)
6535 {
6536 assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
6537 if (assetRequestItem == null)
6538 return true;
6539 }
6540
6541 // At this point, we need to apply perms
6542 // only to notecards and scripts. All
6543 // other asset types are always available
6544 //
6545 if (assetRequestItem.AssetType == 10)
6546 {
6547 if (!((Scene)m_scene).Permissions.CanViewScript(itemID, UUID.Zero, AgentId))
6548 {
6549 SendAgentAlertMessage("Insufficient permissions to view script", false);
6550 return true;
6551 }
6552 }
6553 else if (assetRequestItem.AssetType == 7)
6554 {
6555 if (!((Scene)m_scene).Permissions.CanViewNotecard(itemID, UUID.Zero, AgentId))
6556 {
6557 SendAgentAlertMessage("Insufficient permissions to view notecard", false);
6558 return true;
6559 }
6560 }
6561
6562 if (assetRequestItem.AssetID != requestID)
6563 return true;
6564 }
6565 }
6566 }
6567
6568 //m_assetCache.AddAssetRequest(this, transfer);
6569
6570 MakeAssetRequest(transfer, taskID);
6571
6572 /* RequestAsset = OnRequestAsset;
6573 if (RequestAsset != null)
6574 {
6575 RequestAsset(this, transfer);
6576 }*/
6577 return true;
6578 }
6579
6580 private bool HandleAssetUploadRequest(IClientAPI sender, Packet Pack)
6581 {
6582 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
6583
6584
6585 // m_log.Debug("upload request " + request.ToString());
6586 // m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString());
6587 UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId);
6588
6589 UDPAssetUploadRequest handlerAssetUploadRequest = OnAssetUploadRequest;
6590
6591 if (handlerAssetUploadRequest != null)
6592 {
6593 handlerAssetUploadRequest(this, temp,
6594 request.AssetBlock.TransactionID, request.AssetBlock.Type,
6595 request.AssetBlock.AssetData, request.AssetBlock.StoreLocal,
6596 request.AssetBlock.Tempfile);
6597 }
6598 return true;
6599 }
6600
6601 private bool HandleRequestXfer(IClientAPI sender, Packet Pack)
6602 {
6603 RequestXferPacket xferReq = (RequestXferPacket)Pack;
6604
6605 RequestXfer handlerRequestXfer = OnRequestXfer;
6606
6607 if (handlerRequestXfer != null)
6608 {
6609 handlerRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename));
6610 }
6611 return true;
6612 }
6613
6614 private bool HandleSendXferPacket(IClientAPI sender, Packet Pack)
6615 {
6616 SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack;
6617
6618 XferReceive handlerXferReceive = OnXferReceive;
6619 if (handlerXferReceive != null)
6620 {
6621 handlerXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data);
6622 }
6623 return true;
6624 }
6625
6626 private bool HandleConfirmXferPacket(IClientAPI sender, Packet Pack)
6627 {
6628 ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
6629
6630 ConfirmXfer handlerConfirmXfer = OnConfirmXfer;
6631 if (handlerConfirmXfer != null)
6632 {
6633 handlerConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet);
6634 }
6635 return true;
6636 }
6637
6638 private bool HandleAbortXfer(IClientAPI sender, Packet Pack)
6639 {
6640 AbortXferPacket abortXfer = (AbortXferPacket)Pack;
6641 AbortXfer handlerAbortXfer = OnAbortXfer;
6642 if (handlerAbortXfer != null)
6643 {
6644 handlerAbortXfer(this, abortXfer.XferID.ID);
6645 }
6646
6647 return true;
6648 }
6649
6650 private bool HandleCreateInventoryFolder(IClientAPI sender, Packet Pack)
6651 {
6652 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
6653
6654 #region Packet Session and User Check
6655 if (m_checkPackets)
6656 {
6657 if (invFolder.AgentData.SessionID != SessionId ||
6658 invFolder.AgentData.AgentID != AgentId)
6659 return true;
6660 }
6661 #endregion
6662
6663 CreateInventoryFolder handlerCreateInventoryFolder = OnCreateNewInventoryFolder;
6664 if (handlerCreateInventoryFolder != null)
6665 {
6666 handlerCreateInventoryFolder(this, invFolder.FolderData.FolderID,
6667 (ushort)invFolder.FolderData.Type,
6668 Util.FieldToString(invFolder.FolderData.Name),
6669 invFolder.FolderData.ParentID);
6670 }
6671 return true;
6672 }
6673
6674 private bool HandleUpdateInventoryFolder(IClientAPI sender, Packet Pack)
6675 {
6676 if (OnUpdateInventoryFolder != null)
6677 {
6678 UpdateInventoryFolderPacket invFolderx = (UpdateInventoryFolderPacket)Pack;
6679
6680 #region Packet Session and User Check
6681 if (m_checkPackets)
6682 {
6683 if (invFolderx.AgentData.SessionID != SessionId ||
6684 invFolderx.AgentData.AgentID != AgentId)
6685 return true;
6686 }
6687 #endregion
6688
6689 UpdateInventoryFolder handlerUpdateInventoryFolder = null;
6690
6691 for (int i = 0; i < invFolderx.FolderData.Length; i++)
6692 {
6693 handlerUpdateInventoryFolder = OnUpdateInventoryFolder;
6694 if (handlerUpdateInventoryFolder != null)
6695 {
6696 OnUpdateInventoryFolder(this, invFolderx.FolderData[i].FolderID,
6697 (ushort)invFolderx.FolderData[i].Type,
6698 Util.FieldToString(invFolderx.FolderData[i].Name),
6699 invFolderx.FolderData[i].ParentID);
6700 }
6701 }
6702 }
6703 return true;
6704 }
6705
6706 private bool HandleMoveInventoryFolder(IClientAPI sender, Packet Pack)
6707 {
6708 if (OnMoveInventoryFolder != null)
6709 {
6710 MoveInventoryFolderPacket invFoldery = (MoveInventoryFolderPacket)Pack;
6711
6712 #region Packet Session and User Check
6713 if (m_checkPackets)
6714 {
6715 if (invFoldery.AgentData.SessionID != SessionId ||
6716 invFoldery.AgentData.AgentID != AgentId)
6717 return true;
6718 }
6719 #endregion
6720
6721 MoveInventoryFolder handlerMoveInventoryFolder = null;
6722
6723 for (int i = 0; i < invFoldery.InventoryData.Length; i++)
6724 {
6725 handlerMoveInventoryFolder = OnMoveInventoryFolder;
6726 if (handlerMoveInventoryFolder != null)
6727 {
6728 OnMoveInventoryFolder(this, invFoldery.InventoryData[i].FolderID,
6729 invFoldery.InventoryData[i].ParentID);
6730 }
6731 }
6732 }
6733 return true;
6734 }
6735
6736 private bool HandleCreateInventoryItem(IClientAPI sender, Packet Pack)
6737 {
6738 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
6739
6740 #region Packet Session and User Check
6741 if (m_checkPackets)
6742 {
6743 if (createItem.AgentData.SessionID != SessionId ||
6744 createItem.AgentData.AgentID != AgentId)
6745 return true;
6746 }
6747 #endregion
6748
6749 CreateNewInventoryItem handlerCreateNewInventoryItem = OnCreateNewInventoryItem;
6750 if (handlerCreateNewInventoryItem != null)
6751 {
6752 handlerCreateNewInventoryItem(this, createItem.InventoryBlock.TransactionID,
6753 createItem.InventoryBlock.FolderID,
6754 createItem.InventoryBlock.CallbackID,
6755 Util.FieldToString(createItem.InventoryBlock.Description),
6756 Util.FieldToString(createItem.InventoryBlock.Name),
6757 createItem.InventoryBlock.InvType,
6758 createItem.InventoryBlock.Type,
6759 createItem.InventoryBlock.WearableType,
6760 createItem.InventoryBlock.NextOwnerMask,
6761 Util.UnixTimeSinceEpoch());
6762 }
6763 return true;
6764 }
6765
6766 private bool HandleFetchInventory(IClientAPI sender, Packet Pack)
6767 {
6768 if (OnFetchInventory != null)
6769 {
6770 FetchInventoryPacket FetchInventoryx = (FetchInventoryPacket)Pack;
6771
6772 #region Packet Session and User Check
6773 if (m_checkPackets)
6774 {
6775 if (FetchInventoryx.AgentData.SessionID != SessionId ||
6776 FetchInventoryx.AgentData.AgentID != AgentId)
6777 return true;
6778 }
6779 #endregion
6780
6781 FetchInventory handlerFetchInventory = null;
6782
6783 for (int i = 0; i < FetchInventoryx.InventoryData.Length; i++)
6784 {
6785 handlerFetchInventory = OnFetchInventory;
6786
6787 if (handlerFetchInventory != null)
6788 {
6789 OnFetchInventory(this, FetchInventoryx.InventoryData[i].ItemID,
6790 FetchInventoryx.InventoryData[i].OwnerID);
6791 }
6792 }
6793 }
6794 return true;
6795 }
6796
6797 private bool HandleFetchInventoryDescendents(IClientAPI sender, Packet Pack)
6798 {
6799 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack;
6800
6801 #region Packet Session and User Check
6802 if (m_checkPackets)
6803 {
6804 if (Fetch.AgentData.SessionID != SessionId ||
6805 Fetch.AgentData.AgentID != AgentId)
6806 return true;
6807 }
6808 #endregion
6809
6810 FetchInventoryDescendents handlerFetchInventoryDescendents = OnFetchInventoryDescendents;
6811 if (handlerFetchInventoryDescendents != null)
6812 {
6813 handlerFetchInventoryDescendents(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID,
6814 Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems,
6815 Fetch.InventoryData.SortOrder);
6816 }
6817 return true;
6818 }
6819
6820 private bool HandlePurgeInventoryDescendents(IClientAPI sender, Packet Pack)
6821 {
6822 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack;
6823
6824 #region Packet Session and User Check
6825 if (m_checkPackets)
6826 {
6827 if (Purge.AgentData.SessionID != SessionId ||
6828 Purge.AgentData.AgentID != AgentId)
6829 return true;
6830 }
6831 #endregion
6832
6833 PurgeInventoryDescendents handlerPurgeInventoryDescendents = OnPurgeInventoryDescendents;
6834 if (handlerPurgeInventoryDescendents != null)
6835 {
6836 handlerPurgeInventoryDescendents(this, Purge.InventoryData.FolderID);
6837 }
6838 return true;
6839 }
6840
6841 private bool HandleUpdateInventoryItem(IClientAPI sender, Packet Pack)
6842 {
6843 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack;
6844
6845 #region Packet Session and User Check
6846 if (m_checkPackets)
6847 {
6848 if (inventoryItemUpdate.AgentData.SessionID != SessionId ||
6849 inventoryItemUpdate.AgentData.AgentID != AgentId)
6850 return true;
6851 }
6852 #endregion
6853
6854 if (OnUpdateInventoryItem != null)
6855 {
6856 UpdateInventoryItem handlerUpdateInventoryItem = null;
6857 for (int i = 0; i < inventoryItemUpdate.InventoryData.Length; i++)
6858 {
6859 handlerUpdateInventoryItem = OnUpdateInventoryItem;
6860
6861 if (handlerUpdateInventoryItem != null)
6862 {
6863 InventoryItemBase itemUpd = new InventoryItemBase();
6864 itemUpd.ID = inventoryItemUpdate.InventoryData[i].ItemID;
6865 itemUpd.Name = Util.FieldToString(inventoryItemUpdate.InventoryData[i].Name);
6866 itemUpd.Description = Util.FieldToString(inventoryItemUpdate.InventoryData[i].Description);
6867 itemUpd.GroupID = inventoryItemUpdate.InventoryData[i].GroupID;
6868 itemUpd.GroupOwned = inventoryItemUpdate.InventoryData[i].GroupOwned;
6869 itemUpd.GroupPermissions = inventoryItemUpdate.InventoryData[i].GroupMask;
6870 itemUpd.NextPermissions = inventoryItemUpdate.InventoryData[i].NextOwnerMask;
6871 itemUpd.EveryOnePermissions = inventoryItemUpdate.InventoryData[i].EveryoneMask;
6872 itemUpd.CreationDate = inventoryItemUpdate.InventoryData[i].CreationDate;
6873 itemUpd.Folder = inventoryItemUpdate.InventoryData[i].FolderID;
6874 itemUpd.InvType = inventoryItemUpdate.InventoryData[i].InvType;
6875 itemUpd.SalePrice = inventoryItemUpdate.InventoryData[i].SalePrice;
6876 itemUpd.SaleType = inventoryItemUpdate.InventoryData[i].SaleType;
6877 itemUpd.Flags = inventoryItemUpdate.InventoryData[i].Flags;
6878
6879 OnUpdateInventoryItem(this, inventoryItemUpdate.InventoryData[i].TransactionID,
6880 inventoryItemUpdate.InventoryData[i].ItemID,
6881 itemUpd);
6882 }
6883 }
6884 }
6885 return true;
6886 }
6887
6888 private bool HandleCopyInventoryItem(IClientAPI sender, Packet Pack)
6889 {
6890 CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack;
6891
6892 #region Packet Session and User Check
6893 if (m_checkPackets)
6894 {
6895 if (copyitem.AgentData.SessionID != SessionId ||
6896 copyitem.AgentData.AgentID != AgentId)
6897 return true;
6898 }
6899 #endregion
6900
6901 CopyInventoryItem handlerCopyInventoryItem = null;
6902 if (OnCopyInventoryItem != null)
6903 {
6904 foreach (CopyInventoryItemPacket.InventoryDataBlock datablock in copyitem.InventoryData)
6905 {
6906 handlerCopyInventoryItem = OnCopyInventoryItem;
6907 if (handlerCopyInventoryItem != null)
6908 {
6909 handlerCopyInventoryItem(this, datablock.CallbackID, datablock.OldAgentID,
6910 datablock.OldItemID, datablock.NewFolderID,
6911 Util.FieldToString(datablock.NewName));
6912 }
6913 }
6914 }
6915 return true;
6916 }
6917
6918 private bool HandleMoveInventoryItem(IClientAPI sender, Packet Pack)
6919 {
6920 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack;
6921
6922 #region Packet Session and User Check
6923 if (m_checkPackets)
6924 {
6925 if (moveitem.AgentData.SessionID != SessionId ||
6926 moveitem.AgentData.AgentID != AgentId)
6927 return true;
6928 }
6929 #endregion
6930
6931 if (OnMoveInventoryItem != null)
6932 {
6933 MoveInventoryItem handlerMoveInventoryItem = null;
6934 InventoryItemBase itm = null;
6935 List<InventoryItemBase> items = new List<InventoryItemBase>();
6936 foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData)
6937 {
6938 itm = new InventoryItemBase(datablock.ItemID, AgentId);
6939 itm.Folder = datablock.FolderID;
6940 itm.Name = Util.FieldToString(datablock.NewName);
6941 // weird, comes out as empty string
6942 //m_log.DebugFormat("[XXX] new name: {0}", itm.Name);
6943 items.Add(itm);
6944 }
6945 handlerMoveInventoryItem = OnMoveInventoryItem;
6946 if (handlerMoveInventoryItem != null)
6947 {
6948 handlerMoveInventoryItem(this, items);
6949 }
6950 }
6951 return true;
6952 }
6953
6954 private bool HandleRemoveInventoryItem(IClientAPI sender, Packet Pack)
6955 {
6956 RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack;
6957
6958 #region Packet Session and User Check
6959 if (m_checkPackets)
6960 {
6961 if (removeItem.AgentData.SessionID != SessionId ||
6962 removeItem.AgentData.AgentID != AgentId)
6963 return true;
6964 }
6965 #endregion
6966
6967 if (OnRemoveInventoryItem != null)
6968 {
6969 RemoveInventoryItem handlerRemoveInventoryItem = null;
6970 List<UUID> uuids = new List<UUID>();
6971 foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData)
6972 {
6973 uuids.Add(datablock.ItemID);
6974 }
6975 handlerRemoveInventoryItem = OnRemoveInventoryItem;
6976 if (handlerRemoveInventoryItem != null)
6977 {
6978 handlerRemoveInventoryItem(this, uuids);
6979 }
6980
6981 }
6982 return true;
6983 }
6984
6985 private bool HandleRemoveInventoryFolder(IClientAPI sender, Packet Pack)
6986 {
6987 RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack;
6988
6989 #region Packet Session and User Check
6990 if (m_checkPackets)
6991 {
6992 if (removeFolder.AgentData.SessionID != SessionId ||
6993 removeFolder.AgentData.AgentID != AgentId)
6994 return true;
6995 }
6996 #endregion
6997
6998 if (OnRemoveInventoryFolder != null)
6999 {
7000 RemoveInventoryFolder handlerRemoveInventoryFolder = null;
7001 List<UUID> uuids = new List<UUID>();
7002 foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData)
7003 {
7004 uuids.Add(datablock.FolderID);
7005 }
7006 handlerRemoveInventoryFolder = OnRemoveInventoryFolder;
7007 if (handlerRemoveInventoryFolder != null)
7008 {
7009 handlerRemoveInventoryFolder(this, uuids);
7010 }
7011 }
7012 return true;
7013 }
7014
7015 private bool HandleRemoveInventoryObjects(IClientAPI sender, Packet Pack)
7016 {
7017 RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack;
7018 #region Packet Session and User Check
7019 if (m_checkPackets)
7020 {
7021 if (removeObject.AgentData.SessionID != SessionId ||
7022 removeObject.AgentData.AgentID != AgentId)
7023 return true;
7024 }
7025 #endregion
7026 if (OnRemoveInventoryFolder != null)
7027 {
7028 RemoveInventoryFolder handlerRemoveInventoryFolder = null;
7029 List<UUID> uuids = new List<UUID>();
7030 foreach (RemoveInventoryObjectsPacket.FolderDataBlock datablock in removeObject.FolderData)
7031 {
7032 uuids.Add(datablock.FolderID);
7033 }
7034 handlerRemoveInventoryFolder = OnRemoveInventoryFolder;
7035 if (handlerRemoveInventoryFolder != null)
7036 {
7037 handlerRemoveInventoryFolder(this, uuids);
7038 }
7039 }
7040
7041 if (OnRemoveInventoryItem != null)
7042 {
7043 RemoveInventoryItem handlerRemoveInventoryItem = null;
7044 List<UUID> uuids = new List<UUID>();
7045 foreach (RemoveInventoryObjectsPacket.ItemDataBlock datablock in removeObject.ItemData)
7046 {
7047 uuids.Add(datablock.ItemID);
7048 }
7049 handlerRemoveInventoryItem = OnRemoveInventoryItem;
7050 if (handlerRemoveInventoryItem != null)
7051 {
7052 handlerRemoveInventoryItem(this, uuids);
7053 }
7054 }
7055 return true;
7056 }
7057
7058 private bool HandleRequestTaskInventory(IClientAPI sender, Packet Pack)
7059 {
7060 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack;
7061
7062 #region Packet Session and User Check
7063 if (m_checkPackets)
7064 {
7065 if (requesttask.AgentData.SessionID != SessionId ||
7066 requesttask.AgentData.AgentID != AgentId)
7067 return true;
7068 }
7069 #endregion
7070
7071 RequestTaskInventory handlerRequestTaskInventory = OnRequestTaskInventory;
7072 if (handlerRequestTaskInventory != null)
7073 {
7074 handlerRequestTaskInventory(this, requesttask.InventoryData.LocalID);
7075 }
7076 return true;
7077 }
7078
7079 private bool HandleUpdateTaskInventory(IClientAPI sender, Packet Pack)
7080 {
7081 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
7082
7083 #region Packet Session and User Check
7084 if (m_checkPackets)
7085 {
7086 if (updatetask.AgentData.SessionID != SessionId ||
7087 updatetask.AgentData.AgentID != AgentId)
7088 return true;
7089 }
7090 #endregion
7091
7092 if (OnUpdateTaskInventory != null)
7093 {
7094 if (updatetask.UpdateData.Key == 0)
7095 {
7096 UpdateTaskInventory handlerUpdateTaskInventory = OnUpdateTaskInventory;
7097 if (handlerUpdateTaskInventory != null)
7098 {
7099 TaskInventoryItem newTaskItem = new TaskInventoryItem();
7100 newTaskItem.ItemID = updatetask.InventoryData.ItemID;
7101 newTaskItem.ParentID = updatetask.InventoryData.FolderID;
7102 newTaskItem.CreatorID = updatetask.InventoryData.CreatorID;
7103 newTaskItem.OwnerID = updatetask.InventoryData.OwnerID;
7104 newTaskItem.GroupID = updatetask.InventoryData.GroupID;
7105 newTaskItem.BasePermissions = updatetask.InventoryData.BaseMask;
7106 newTaskItem.CurrentPermissions = updatetask.InventoryData.OwnerMask;
7107 newTaskItem.GroupPermissions = updatetask.InventoryData.GroupMask;
7108 newTaskItem.EveryonePermissions = updatetask.InventoryData.EveryoneMask;
7109 newTaskItem.NextPermissions = updatetask.InventoryData.NextOwnerMask;
7110 //newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned;
7111 newTaskItem.Type = updatetask.InventoryData.Type;
7112 newTaskItem.InvType = updatetask.InventoryData.InvType;
7113 newTaskItem.Flags = updatetask.InventoryData.Flags;
7114 //newTaskItem.SaleType=updatetask.InventoryData.SaleType;
7115 //newTaskItem.SalePrice=updatetask.InventoryData.SalePrice;;
7116 newTaskItem.Name = Util.FieldToString(updatetask.InventoryData.Name);
7117 newTaskItem.Description = Util.FieldToString(updatetask.InventoryData.Description);
7118 newTaskItem.CreationDate = (uint)updatetask.InventoryData.CreationDate;
7119 handlerUpdateTaskInventory(this, updatetask.InventoryData.TransactionID,
7120 newTaskItem, updatetask.UpdateData.LocalID);
7121 }
7122 }
7123 }
7124
7125 return true;
7126 }
7127
7128 private bool HandleRemoveTaskInventory(IClientAPI sender, Packet Pack)
7129 {
7130 RemoveTaskInventoryPacket removeTask = (RemoveTaskInventoryPacket)Pack;
7131
7132 #region Packet Session and User Check
7133 if (m_checkPackets)
7134 {
7135 if (removeTask.AgentData.SessionID != SessionId ||
7136 removeTask.AgentData.AgentID != AgentId)
7137 return true;
7138 }
7139 #endregion
7140
7141 RemoveTaskInventory handlerRemoveTaskItem = OnRemoveTaskItem;
7142
7143 if (handlerRemoveTaskItem != null)
7144 {
7145 handlerRemoveTaskItem(this, removeTask.InventoryData.ItemID, removeTask.InventoryData.LocalID);
7146 }
7147
7148 return true;
7149 }
7150
7151 private bool HandleMoveTaskInventory(IClientAPI sender, Packet Pack)
7152 {
7153 MoveTaskInventoryPacket moveTaskInventoryPacket = (MoveTaskInventoryPacket)Pack;
7154
7155 #region Packet Session and User Check
7156 if (m_checkPackets)
7157 {
7158 if (moveTaskInventoryPacket.AgentData.SessionID != SessionId ||
7159 moveTaskInventoryPacket.AgentData.AgentID != AgentId)
7160 return true;
7161 }
7162 #endregion
7163
7164 MoveTaskInventory handlerMoveTaskItem = OnMoveTaskItem;
7165
7166 if (handlerMoveTaskItem != null)
7167 {
7168 handlerMoveTaskItem(
7169 this, moveTaskInventoryPacket.AgentData.FolderID,
7170 moveTaskInventoryPacket.InventoryData.LocalID,
7171 moveTaskInventoryPacket.InventoryData.ItemID);
7172 }
7173
7174 return true;
7175 }
7176
7177 private bool HandleRezScript(IClientAPI sender, Packet Pack)
7178 {
7179 //m_log.Debug(Pack.ToString());
7180 RezScriptPacket rezScriptx = (RezScriptPacket)Pack;
7181
7182 #region Packet Session and User Check
7183 if (m_checkPackets)
7184 {
7185 if (rezScriptx.AgentData.SessionID != SessionId ||
7186 rezScriptx.AgentData.AgentID != AgentId)
7187 return true;
7188 }
7189 #endregion
7190
7191 RezScript handlerRezScript = OnRezScript;
7192 InventoryItemBase item = new InventoryItemBase();
7193 item.ID = rezScriptx.InventoryBlock.ItemID;
7194 item.Folder = rezScriptx.InventoryBlock.FolderID;
7195 item.CreatorId = rezScriptx.InventoryBlock.CreatorID.ToString();
7196 item.Owner = rezScriptx.InventoryBlock.OwnerID;
7197 item.BasePermissions = rezScriptx.InventoryBlock.BaseMask;
7198 item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask;
7199 item.EveryOnePermissions = rezScriptx.InventoryBlock.EveryoneMask;
7200 item.NextPermissions = rezScriptx.InventoryBlock.NextOwnerMask;
7201 item.GroupPermissions = rezScriptx.InventoryBlock.GroupMask;
7202 item.GroupOwned = rezScriptx.InventoryBlock.GroupOwned;
7203 item.GroupID = rezScriptx.InventoryBlock.GroupID;
7204 item.AssetType = rezScriptx.InventoryBlock.Type;
7205 item.InvType = rezScriptx.InventoryBlock.InvType;
7206 item.Flags = rezScriptx.InventoryBlock.Flags;
7207 item.SaleType = rezScriptx.InventoryBlock.SaleType;
7208 item.SalePrice = rezScriptx.InventoryBlock.SalePrice;
7209 item.Name = Util.FieldToString(rezScriptx.InventoryBlock.Name);
7210 item.Description = Util.FieldToString(rezScriptx.InventoryBlock.Description);
7211 item.CreationDate = rezScriptx.InventoryBlock.CreationDate;
7212
7213 if (handlerRezScript != null)
7214 {
7215 handlerRezScript(this, item, rezScriptx.InventoryBlock.TransactionID, rezScriptx.UpdateBlock.ObjectLocalID);
7216 }
7217 return true;
7218 }
7219
7220 private bool HandleMapLayerRequest(IClientAPI sender, Packet Pack)
7221 {
7222 RequestMapLayer();
7223 return true;
7224 }
7225
7226 private bool HandleMapBlockRequest(IClientAPI sender, Packet Pack)
7227 {
7228 MapBlockRequestPacket MapRequest = (MapBlockRequestPacket)Pack;
7229
7230 #region Packet Session and User Check
7231 if (m_checkPackets)
7232 {
7233 if (MapRequest.AgentData.SessionID != SessionId ||
7234 MapRequest.AgentData.AgentID != AgentId)
7235 return true;
7236 }
7237 #endregion
7238
7239 RequestMapBlocks handlerRequestMapBlocks = OnRequestMapBlocks;
7240 if (handlerRequestMapBlocks != null)
7241 {
7242 handlerRequestMapBlocks(this, MapRequest.PositionData.MinX, MapRequest.PositionData.MinY,
7243 MapRequest.PositionData.MaxX, MapRequest.PositionData.MaxY, MapRequest.AgentData.Flags);
7244 }
7245 return true;
7246 }
7247
7248 private bool HandleMapNameRequest(IClientAPI sender, Packet Pack)
7249 {
7250 MapNameRequestPacket map = (MapNameRequestPacket)Pack;
7251
7252 #region Packet Session and User Check
7253 if (m_checkPackets)
7254 {
7255 if (map.AgentData.SessionID != SessionId ||
7256 map.AgentData.AgentID != AgentId)
7257 return true;
7258 }
7259 #endregion
7260
7261 string mapName = Util.UTF8.GetString(map.NameData.Name, 0,
7262 map.NameData.Name.Length - 1);
7263 RequestMapName handlerMapNameRequest = OnMapNameRequest;
7264 if (handlerMapNameRequest != null)
7265 {
7266 handlerMapNameRequest(this, mapName);
7267 }
7268 return true;
7269 }
7270
7271 private bool HandleTeleportLandmarkRequest(IClientAPI sender, Packet Pack)
7272 {
7273 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
7274
7275 #region Packet Session and User Check
7276 if (m_checkPackets)
7277 {
7278 if (tpReq.Info.SessionID != SessionId ||
7279 tpReq.Info.AgentID != AgentId)
7280 return true;
7281 }
7282 #endregion
7283
7284 UUID lmid = tpReq.Info.LandmarkID;
7285 AssetLandmark lm;
7286 if (lmid != UUID.Zero)
7287 {
7288 //AssetBase lma = m_assetCache.GetAsset(lmid, false);
7289 AssetBase lma = m_assetService.Get(lmid.ToString());
7290
7291 if (lma == null)
7292 {
7293 // Failed to find landmark
7294 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
7295 tpCancel.Info.SessionID = tpReq.Info.SessionID;
7296 tpCancel.Info.AgentID = tpReq.Info.AgentID;
7297 OutPacket(tpCancel, ThrottleOutPacketType.Task);
7298 }
7299
7300 try
7301 {
7302 lm = new AssetLandmark(lma);
7303 }
7304 catch (NullReferenceException)
7305 {
7306 // asset not found generates null ref inside the assetlandmark constructor.
7307 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
7308 tpCancel.Info.SessionID = tpReq.Info.SessionID;
7309 tpCancel.Info.AgentID = tpReq.Info.AgentID;
7310 OutPacket(tpCancel, ThrottleOutPacketType.Task);
7311 return true;
7312 }
7313 }
7314 else
7315 {
7316 // Teleport home request
7317 UUIDNameRequest handlerTeleportHomeRequest = OnTeleportHomeRequest;
7318 if (handlerTeleportHomeRequest != null)
7319 {
7320 handlerTeleportHomeRequest(AgentId, this);
7321 }
7322 return true;
7323 }
7324
7325 TeleportLandmarkRequest handlerTeleportLandmarkRequest = OnTeleportLandmarkRequest;
7326 if (handlerTeleportLandmarkRequest != null)
7327 {
7328 handlerTeleportLandmarkRequest(this, lm.RegionID, lm.Position);
7329 }
7330 else
7331 {
7332 //no event handler so cancel request
7333
7334
7335 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
7336 tpCancel.Info.AgentID = tpReq.Info.AgentID;
7337 tpCancel.Info.SessionID = tpReq.Info.SessionID;
7338 OutPacket(tpCancel, ThrottleOutPacketType.Task);
7339
7340 }
7341 return true;
7342 }
7343
7344 private bool HandleTeleportLocationRequest(IClientAPI sender, Packet Pack)
7345 {
7346 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack;
7347 // m_log.Debug(tpLocReq.ToString());
7348
7349 #region Packet Session and User Check
7350 if (m_checkPackets)
7351 {
7352 if (tpLocReq.AgentData.SessionID != SessionId ||
7353 tpLocReq.AgentData.AgentID != AgentId)
7354 return true;
7355 }
7356 #endregion
7357
7358 TeleportLocationRequest handlerTeleportLocationRequest = OnTeleportLocationRequest;
7359 if (handlerTeleportLocationRequest != null)
7360 {
7361 handlerTeleportLocationRequest(this, tpLocReq.Info.RegionHandle, tpLocReq.Info.Position,
7362 tpLocReq.Info.LookAt, 16);
7363 }
7364 else
7365 {
7366 //no event handler so cancel request
7367 TeleportCancelPacket tpCancel = (TeleportCancelPacket)PacketPool.Instance.GetPacket(PacketType.TeleportCancel);
7368 tpCancel.Info.SessionID = tpLocReq.AgentData.SessionID;
7369 tpCancel.Info.AgentID = tpLocReq.AgentData.AgentID;
7370 OutPacket(tpCancel, ThrottleOutPacketType.Task);
7371 }
7372 return true;
7373 }
7374
7375 #endregion Inventory/Asset/Other related packets
7376
7377 private bool HandleUUIDNameRequest(IClientAPI sender, Packet Pack)
7378 {
7379 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
7380
7381 foreach (UUIDNameRequestPacket.UUIDNameBlockBlock UUIDBlock in incoming.UUIDNameBlock)
7382 {
7383 UUIDNameRequest handlerNameRequest = OnNameFromUUIDRequest;
7384 if (handlerNameRequest != null)
7385 {
7386 handlerNameRequest(UUIDBlock.ID, this);
7387 }
7388 }
7389 return true;
7390 }
7391
7392 #region Parcel related packets
7393
7394 private bool HandleRegionHandleRequest(IClientAPI sender, Packet Pack)
7395 {
7396 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
7397
7398 RegionHandleRequest handlerRegionHandleRequest = OnRegionHandleRequest;
7399 if (handlerRegionHandleRequest != null)
7400 {
7401 handlerRegionHandleRequest(this, rhrPack.RequestBlock.RegionID);
7402 }
7403 return true;
7404 }
7405
7406 private bool HandleParcelInfoRequest(IClientAPI sender, Packet Pack)
7407 {
7408 ParcelInfoRequestPacket pirPack = (ParcelInfoRequestPacket)Pack;
7409
7410 #region Packet Session and User Check
7411 if (m_checkPackets)
7412 {
7413 if (pirPack.AgentData.SessionID != SessionId ||
7414 pirPack.AgentData.AgentID != AgentId)
7415 return true;
7416 }
7417 #endregion
7418
7419 ParcelInfoRequest handlerParcelInfoRequest = OnParcelInfoRequest;
7420 if (handlerParcelInfoRequest != null)
7421 {
7422 handlerParcelInfoRequest(this, pirPack.Data.ParcelID);
7423 }
7424 return true;
7425 }
7426
7427 private bool HandleParcelAccessListRequest(IClientAPI sender, Packet Pack)
7428 {
7429 ParcelAccessListRequestPacket requestPacket = (ParcelAccessListRequestPacket)Pack;
7430
7431 #region Packet Session and User Check
7432 if (m_checkPackets)
7433 {
7434 if (requestPacket.AgentData.SessionID != SessionId ||
7435 requestPacket.AgentData.AgentID != AgentId)
7436 return true;
7437 }
7438 #endregion
7439
7440 ParcelAccessListRequest handlerParcelAccessListRequest = OnParcelAccessListRequest;
7441
7442 if (handlerParcelAccessListRequest != null)
7443 {
7444 handlerParcelAccessListRequest(requestPacket.AgentData.AgentID, requestPacket.AgentData.SessionID,
7445 requestPacket.Data.Flags, requestPacket.Data.SequenceID,
7446 requestPacket.Data.LocalID, this);
7447 }
7448 return true;
7449 }
7450
7451 private bool HandleParcelAccessListUpdate(IClientAPI sender, Packet Pack)
7452 {
7453 ParcelAccessListUpdatePacket updatePacket = (ParcelAccessListUpdatePacket)Pack;
7454
7455 #region Packet Session and User Check
7456 if (m_checkPackets)
7457 {
7458 if (updatePacket.AgentData.SessionID != SessionId ||
7459 updatePacket.AgentData.AgentID != AgentId)
7460 return true;
7461 }
7462 #endregion
7463
7464 List<ParcelManager.ParcelAccessEntry> entries = new List<ParcelManager.ParcelAccessEntry>();
7465 foreach (ParcelAccessListUpdatePacket.ListBlock block in updatePacket.List)
7466 {
7467 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
7468 entry.AgentID = block.ID;
7469 entry.Flags = (AccessList)block.Flags;
7470 entry.Time = new DateTime();
7471 entries.Add(entry);
7472 }
7473
7474 ParcelAccessListUpdateRequest handlerParcelAccessListUpdateRequest = OnParcelAccessListUpdateRequest;
7475 if (handlerParcelAccessListUpdateRequest != null)
7476 {
7477 handlerParcelAccessListUpdateRequest(updatePacket.AgentData.AgentID,
7478 updatePacket.AgentData.SessionID, updatePacket.Data.Flags,
7479 updatePacket.Data.LocalID, entries, this);
7480 }
7481 return true;
7482 }
7483
7484 private bool HandleParcelPropertiesRequest(IClientAPI sender, Packet Pack)
7485 {
7486 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
7487
7488 #region Packet Session and User Check
7489 if (m_checkPackets)
7490 {
7491 if (propertiesRequest.AgentData.SessionID != SessionId ||
7492 propertiesRequest.AgentData.AgentID != AgentId)
7493 return true;
7494 }
7495 #endregion
7496
7497 ParcelPropertiesRequest handlerParcelPropertiesRequest = OnParcelPropertiesRequest;
7498 if (handlerParcelPropertiesRequest != null)
7499 {
7500 handlerParcelPropertiesRequest((int)Math.Round(propertiesRequest.ParcelData.West),
7501 (int)Math.Round(propertiesRequest.ParcelData.South),
7502 (int)Math.Round(propertiesRequest.ParcelData.East),
7503 (int)Math.Round(propertiesRequest.ParcelData.North),
7504 propertiesRequest.ParcelData.SequenceID,
7505 propertiesRequest.ParcelData.SnapSelection, this);
7506 }
7507 return true;
7508 }
7509
7510 private bool HandleParcelDivide(IClientAPI sender, Packet Pack)
7511 {
7512 ParcelDividePacket landDivide = (ParcelDividePacket)Pack;
7513
7514 #region Packet Session and User Check
7515 if (m_checkPackets)
7516 {
7517 if (landDivide.AgentData.SessionID != SessionId ||
7518 landDivide.AgentData.AgentID != AgentId)
7519 return true;
7520 }
7521 #endregion
7522
7523 ParcelDivideRequest handlerParcelDivideRequest = OnParcelDivideRequest;
7524 if (handlerParcelDivideRequest != null)
7525 {
7526 handlerParcelDivideRequest((int)Math.Round(landDivide.ParcelData.West),
7527 (int)Math.Round(landDivide.ParcelData.South),
7528 (int)Math.Round(landDivide.ParcelData.East),
7529 (int)Math.Round(landDivide.ParcelData.North), this);
7530 }
7531 return true;
7532 }
7533
7534 private bool HandleParcelJoin(IClientAPI sender, Packet Pack)
7535 {
7536 ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack;
7537
7538 #region Packet Session and User Check
7539 if (m_checkPackets)
7540 {
7541 if (landJoin.AgentData.SessionID != SessionId ||
7542 landJoin.AgentData.AgentID != AgentId)
7543 return true;
7544 }
7545 #endregion
7546
7547 ParcelJoinRequest handlerParcelJoinRequest = OnParcelJoinRequest;
7548
7549 if (handlerParcelJoinRequest != null)
7550 {
7551 handlerParcelJoinRequest((int)Math.Round(landJoin.ParcelData.West),
7552 (int)Math.Round(landJoin.ParcelData.South),
7553 (int)Math.Round(landJoin.ParcelData.East),
7554 (int)Math.Round(landJoin.ParcelData.North), this);
7555 }
7556 return true;
7557 }
7558
7559 private bool HandleParcelPropertiesUpdate(IClientAPI sender, Packet Pack)
7560 {
7561 ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack;
7562
7563 #region Packet Session and User Check
7564 if (m_checkPackets)
7565 {
7566 if (parcelPropertiesPacket.AgentData.SessionID != SessionId ||
7567 parcelPropertiesPacket.AgentData.AgentID != AgentId)
7568 return true;
7569 }
7570 #endregion
7571
7572 ParcelPropertiesUpdateRequest handlerParcelPropertiesUpdateRequest = OnParcelPropertiesUpdateRequest;
7573
7574 if (handlerParcelPropertiesUpdateRequest != null)
7575 {
7576 LandUpdateArgs args = new LandUpdateArgs();
7577
7578 args.AuthBuyerID = parcelPropertiesPacket.ParcelData.AuthBuyerID;
7579 args.Category = (ParcelCategory)parcelPropertiesPacket.ParcelData.Category;
7580 args.Desc = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Desc);
7581 args.GroupID = parcelPropertiesPacket.ParcelData.GroupID;
7582 args.LandingType = parcelPropertiesPacket.ParcelData.LandingType;
7583 args.MediaAutoScale = parcelPropertiesPacket.ParcelData.MediaAutoScale;
7584 args.MediaID = parcelPropertiesPacket.ParcelData.MediaID;
7585 args.MediaURL = Utils.BytesToString(parcelPropertiesPacket.ParcelData.MediaURL);
7586 args.MusicURL = Utils.BytesToString(parcelPropertiesPacket.ParcelData.MusicURL);
7587 args.Name = Utils.BytesToString(parcelPropertiesPacket.ParcelData.Name);
7588 args.ParcelFlags = parcelPropertiesPacket.ParcelData.ParcelFlags;
7589 args.PassHours = parcelPropertiesPacket.ParcelData.PassHours;
7590 args.PassPrice = parcelPropertiesPacket.ParcelData.PassPrice;
7591 args.SalePrice = parcelPropertiesPacket.ParcelData.SalePrice;
7592 args.SnapshotID = parcelPropertiesPacket.ParcelData.SnapshotID;
7593 args.UserLocation = parcelPropertiesPacket.ParcelData.UserLocation;
7594 args.UserLookAt = parcelPropertiesPacket.ParcelData.UserLookAt;
7595 handlerParcelPropertiesUpdateRequest(args, parcelPropertiesPacket.ParcelData.LocalID, this);
7596 }
7597 return true;
7598 }
7599
7600 private bool HandleParcelSelectObjects(IClientAPI sender, Packet Pack)
7601 {
7602 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack;
7603
7604 #region Packet Session and User Check
7605 if (m_checkPackets)
7606 {
7607 if (selectPacket.AgentData.SessionID != SessionId ||
7608 selectPacket.AgentData.AgentID != AgentId)
7609 return true;
7610 }
7611 #endregion
7612
7613 List<UUID> returnIDs = new List<UUID>();
7614
7615 foreach (ParcelSelectObjectsPacket.ReturnIDsBlock rb in
7616 selectPacket.ReturnIDs)
7617 {
7618 returnIDs.Add(rb.ReturnID);
7619 }
7620
7621 ParcelSelectObjects handlerParcelSelectObjects = OnParcelSelectObjects;
7622
7623 if (handlerParcelSelectObjects != null)
7624 {
7625 handlerParcelSelectObjects(selectPacket.ParcelData.LocalID,
7626 Convert.ToInt32(selectPacket.ParcelData.ReturnType), returnIDs, this);
7627 }
7628 return true;
7629 }
7630
7631 private bool HandleParcelObjectOwnersRequest(IClientAPI sender, Packet Pack)
7632 {
7633 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack;
7634
7635 #region Packet Session and User Check
7636 if (m_checkPackets)
7637 {
7638 if (reqPacket.AgentData.SessionID != SessionId ||
7639 reqPacket.AgentData.AgentID != AgentId)
7640 return true;
7641 }
7642 #endregion
7643
7644 ParcelObjectOwnerRequest handlerParcelObjectOwnerRequest = OnParcelObjectOwnerRequest;
7645
7646 if (handlerParcelObjectOwnerRequest != null)
7647 {
7648 handlerParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this);
7649 }
7650 return true;
7651
7652 }
7653
7654 private bool HandleParcelGodForceOwner(IClientAPI sender, Packet Pack)
7655 {
7656 ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack;
7657
7658 #region Packet Session and User Check
7659 if (m_checkPackets)
7660 {
7661 if (godForceOwnerPacket.AgentData.SessionID != SessionId ||
7662 godForceOwnerPacket.AgentData.AgentID != AgentId)
7663 return true;
7664 }
7665 #endregion
7666
7667 ParcelGodForceOwner handlerParcelGodForceOwner = OnParcelGodForceOwner;
7668 if (handlerParcelGodForceOwner != null)
7669 {
7670 handlerParcelGodForceOwner(godForceOwnerPacket.Data.LocalID, godForceOwnerPacket.Data.OwnerID, this);
7671 }
7672 return true;
7673 }
7674
7675 private bool HandleParcelRelease(IClientAPI sender, Packet Pack)
7676 {
7677 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack;
7678
7679 #region Packet Session and User Check
7680 if (m_checkPackets)
7681 {
7682 if (releasePacket.AgentData.SessionID != SessionId ||
7683 releasePacket.AgentData.AgentID != AgentId)
7684 return true;
7685 }
7686 #endregion
7687
7688 ParcelAbandonRequest handlerParcelAbandonRequest = OnParcelAbandonRequest;
7689 if (handlerParcelAbandonRequest != null)
7690 {
7691 handlerParcelAbandonRequest(releasePacket.Data.LocalID, this);
7692 }
7693 return true;
7694 }
7695
7696 private bool HandleParcelReclaim(IClientAPI sender, Packet Pack)
7697 {
7698 ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack;
7699
7700 #region Packet Session and User Check
7701 if (m_checkPackets)
7702 {
7703 if (reclaimPacket.AgentData.SessionID != SessionId ||
7704 reclaimPacket.AgentData.AgentID != AgentId)
7705 return true;
7706 }
7707 #endregion
7708
7709 ParcelReclaim handlerParcelReclaim = OnParcelReclaim;
7710 if (handlerParcelReclaim != null)
7711 {
7712 handlerParcelReclaim(reclaimPacket.Data.LocalID, this);
7713 }
7714 return true;
7715 }
7716
7717 private bool HandleParcelReturnObjects(IClientAPI sender, Packet Pack)
7718 {
7719 ParcelReturnObjectsPacket parcelReturnObjects = (ParcelReturnObjectsPacket)Pack;
7720
7721 #region Packet Session and User Check
7722 if (m_checkPackets)
7723 {
7724 if (parcelReturnObjects.AgentData.SessionID != SessionId ||
7725 parcelReturnObjects.AgentData.AgentID != AgentId)
7726 return true;
7727 }
7728 #endregion
7729
7730 UUID[] puserselectedOwnerIDs = new UUID[parcelReturnObjects.OwnerIDs.Length];
7731 for (int parceliterator = 0; parceliterator < parcelReturnObjects.OwnerIDs.Length; parceliterator++)
7732 puserselectedOwnerIDs[parceliterator] = parcelReturnObjects.OwnerIDs[parceliterator].OwnerID;
7733
7734 UUID[] puserselectedTaskIDs = new UUID[parcelReturnObjects.TaskIDs.Length];
7735
7736 for (int parceliterator = 0; parceliterator < parcelReturnObjects.TaskIDs.Length; parceliterator++)
7737 puserselectedTaskIDs[parceliterator] = parcelReturnObjects.TaskIDs[parceliterator].TaskID;
7738
7739 ParcelReturnObjectsRequest handlerParcelReturnObjectsRequest = OnParcelReturnObjectsRequest;
7740 if (handlerParcelReturnObjectsRequest != null)
7741 {
7742 handlerParcelReturnObjectsRequest(parcelReturnObjects.ParcelData.LocalID, parcelReturnObjects.ParcelData.ReturnType, puserselectedOwnerIDs, puserselectedTaskIDs, this);
7743
7744 }
7745 return true;
7746 }
7747
7748 private bool HandleParcelSetOtherCleanTime(IClientAPI sender, Packet Pack)
7749 {
7750 ParcelSetOtherCleanTimePacket parcelSetOtherCleanTimePacket = (ParcelSetOtherCleanTimePacket)Pack;
7751
7752 #region Packet Session and User Check
7753 if (m_checkPackets)
7754 {
7755 if (parcelSetOtherCleanTimePacket.AgentData.SessionID != SessionId ||
7756 parcelSetOtherCleanTimePacket.AgentData.AgentID != AgentId)
7757 return true;
7758 }
7759 #endregion
7760
7761 ParcelSetOtherCleanTime handlerParcelSetOtherCleanTime = OnParcelSetOtherCleanTime;
7762 if (handlerParcelSetOtherCleanTime != null)
7763 {
7764 handlerParcelSetOtherCleanTime(this,
7765 parcelSetOtherCleanTimePacket.ParcelData.LocalID,
7766 parcelSetOtherCleanTimePacket.ParcelData.OtherCleanTime);
7767 }
7768 return true;
7769 }
7770
7771 private bool HandleLandStatRequest(IClientAPI sender, Packet Pack)
7772 {
7773 LandStatRequestPacket lsrp = (LandStatRequestPacket)Pack;
7774
7775 #region Packet Session and User Check
7776 if (m_checkPackets)
7777 {
7778 if (lsrp.AgentData.SessionID != SessionId ||
7779 lsrp.AgentData.AgentID != AgentId)
7780 return true;
7781 }
7782 #endregion
7783
7784 GodLandStatRequest handlerLandStatRequest = OnLandStatRequest;
7785 if (handlerLandStatRequest != null)
7786 {
7787 handlerLandStatRequest(lsrp.RequestData.ParcelLocalID, lsrp.RequestData.ReportType, lsrp.RequestData.RequestFlags, Utils.BytesToString(lsrp.RequestData.Filter), this);
7788 }
7789 return true;
7790 }
7791
7792 private bool HandleParcelDwellRequest(IClientAPI sender, Packet Pack)
7793 {
7794 ParcelDwellRequestPacket dwellrq =
7795 (ParcelDwellRequestPacket)Pack;
7796
7797 #region Packet Session and User Check
7798 if (m_checkPackets)
7799 {
7800 if (dwellrq.AgentData.SessionID != SessionId ||
7801 dwellrq.AgentData.AgentID != AgentId)
7802 return true;
7803 }
7804 #endregion
7805
7806 ParcelDwellRequest handlerParcelDwellRequest = OnParcelDwellRequest;
7807 if (handlerParcelDwellRequest != null)
7808 {
7809 handlerParcelDwellRequest(dwellrq.Data.LocalID, this);
7810 }
7811 return true;
7812 }
7813
7814 #endregion Parcel related packets
7815
7816 #region Estate Packets
7817
7818 private bool HandleEstateOwnerMessage(IClientAPI sender, Packet Pack)
7819 {
7820 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
7821 //m_log.Debug(messagePacket.ToString());
7822 GodLandStatRequest handlerLandStatRequest;
7823
7824 #region Packet Session and User Check
7825 if (m_checkPackets)
7826 {
7827 if (messagePacket.AgentData.SessionID != SessionId ||
7828 messagePacket.AgentData.AgentID != AgentId)
7829 return true;
7830 }
7831 #endregion
7832
7833 switch (Utils.BytesToString(messagePacket.MethodData.Method))
7834 {
7835 case "getinfo":
7836 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7837 {
7838 OnDetailedEstateDataRequest(this, messagePacket.MethodData.Invoice);
7839 }
7840 return true;
7841 case "setregioninfo":
7842 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7843 {
7844 OnSetEstateFlagsRequest(convertParamStringToBool(messagePacket.ParamList[0].Parameter), convertParamStringToBool(messagePacket.ParamList[1].Parameter),
7845 convertParamStringToBool(messagePacket.ParamList[2].Parameter), !convertParamStringToBool(messagePacket.ParamList[3].Parameter),
7846 Convert.ToInt16(Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[4].Parameter))),
7847 (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter)),
7848 Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[6].Parameter)),
7849 convertParamStringToBool(messagePacket.ParamList[7].Parameter), convertParamStringToBool(messagePacket.ParamList[8].Parameter));
7850 }
7851 return true;
7852 // case "texturebase":
7853 // if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7854 // {
7855 // foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
7856 // {
7857 // string s = Utils.BytesToString(block.Parameter);
7858 // string[] splitField = s.Split(' ');
7859 // if (splitField.Length == 2)
7860 // {
7861 // UUID tempUUID = new UUID(splitField[1]);
7862 // OnSetEstateTerrainBaseTexture(this, Convert.ToInt16(splitField[0]), tempUUID);
7863 // }
7864 // }
7865 // }
7866 // break;
7867 case "texturedetail":
7868 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7869 {
7870 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
7871 {
7872 string s = Utils.BytesToString(block.Parameter);
7873 string[] splitField = s.Split(' ');
7874 if (splitField.Length == 2)
7875 {
7876 Int16 corner = Convert.ToInt16(splitField[0]);
7877 UUID textureUUID = new UUID(splitField[1]);
7878
7879 OnSetEstateTerrainDetailTexture(this, corner, textureUUID);
7880 }
7881 }
7882 }
7883
7884 return true;
7885 case "textureheights":
7886 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7887 {
7888 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
7889 {
7890 string s = Utils.BytesToString(block.Parameter);
7891 string[] splitField = s.Split(' ');
7892 if (splitField.Length == 3)
7893 {
7894 Int16 corner = Convert.ToInt16(splitField[0]);
7895 float lowValue = (float)Convert.ToDecimal(splitField[1]);
7896 float highValue = (float)Convert.ToDecimal(splitField[2]);
7897
7898 OnSetEstateTerrainTextureHeights(this, corner, lowValue, highValue);
7899 }
7900 }
7901 }
7902 return true;
7903 case "texturecommit":
7904 OnCommitEstateTerrainTextureRequest(this);
7905 return true;
7906 case "setregionterrain":
7907 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7908 {
7909 if (messagePacket.ParamList.Length != 9)
7910 {
7911 m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length");
7912 }
7913 else
7914 {
7915 try
7916 {
7917 string tmp = Utils.BytesToString(messagePacket.ParamList[0].Parameter);
7918 if (!tmp.Contains(".")) tmp += ".00";
7919 float WaterHeight = (float)Convert.ToDecimal(tmp);
7920 tmp = Utils.BytesToString(messagePacket.ParamList[1].Parameter);
7921 if (!tmp.Contains(".")) tmp += ".00";
7922 float TerrainRaiseLimit = (float)Convert.ToDecimal(tmp);
7923 tmp = Utils.BytesToString(messagePacket.ParamList[2].Parameter);
7924 if (!tmp.Contains(".")) tmp += ".00";
7925 float TerrainLowerLimit = (float)Convert.ToDecimal(tmp);
7926 bool UseEstateSun = convertParamStringToBool(messagePacket.ParamList[3].Parameter);
7927 bool UseFixedSun = convertParamStringToBool(messagePacket.ParamList[4].Parameter);
7928 float SunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[5].Parameter));
7929 bool UseGlobal = convertParamStringToBool(messagePacket.ParamList[6].Parameter);
7930 bool EstateFixedSun = convertParamStringToBool(messagePacket.ParamList[7].Parameter);
7931 float EstateSunHour = (float)Convert.ToDecimal(Utils.BytesToString(messagePacket.ParamList[8].Parameter));
7932
7933 OnSetRegionTerrainSettings(WaterHeight, TerrainRaiseLimit, TerrainLowerLimit, UseEstateSun, UseFixedSun, SunHour, UseGlobal, EstateFixedSun, EstateSunHour);
7934
7935 }
7936 catch (Exception ex)
7937 {
7938 m_log.Error("EstateOwnerMessage: Exception while setting terrain settings: \n" + messagePacket + "\n" + ex);
7939 }
7940 }
7941 }
7942
7943 return true;
7944 case "restart":
7945 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7946 {
7947 // There's only 1 block in the estateResetSim.. and that's the number of seconds till restart.
7948 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
7949 {
7950 float timeSeconds;
7951 Utils.TryParseSingle(Utils.BytesToString(block.Parameter), out timeSeconds);
7952 timeSeconds = (int)timeSeconds;
7953 OnEstateRestartSimRequest(this, (int)timeSeconds);
7954
7955 }
7956 }
7957 return true;
7958 case "estatechangecovenantid":
7959 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7960 {
7961 foreach (EstateOwnerMessagePacket.ParamListBlock block in messagePacket.ParamList)
7962 {
7963 UUID newCovenantID = new UUID(Utils.BytesToString(block.Parameter));
7964 OnEstateChangeCovenantRequest(this, newCovenantID);
7965 }
7966 }
7967 return true;
7968 case "estateaccessdelta": // Estate access delta manages the banlist and allow list too.
7969 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7970 {
7971 int estateAccessType = Convert.ToInt16(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
7972 OnUpdateEstateAccessDeltaRequest(this, messagePacket.MethodData.Invoice, estateAccessType, new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter)));
7973
7974 }
7975 return true;
7976 case "simulatormessage":
7977 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7978 {
7979 UUID invoice = messagePacket.MethodData.Invoice;
7980 UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
7981 string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
7982 string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
7983 UUID sessionID = messagePacket.AgentData.SessionID;
7984 OnSimulatorBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message);
7985 }
7986 return true;
7987 case "instantmessage":
7988 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
7989 {
7990 if (messagePacket.ParamList.Length < 5)
7991 return true;
7992 UUID invoice = messagePacket.MethodData.Invoice;
7993 UUID SenderID = new UUID(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
7994 string SenderName = Utils.BytesToString(messagePacket.ParamList[3].Parameter);
7995 string Message = Utils.BytesToString(messagePacket.ParamList[4].Parameter);
7996 UUID sessionID = messagePacket.AgentData.SessionID;
7997 OnEstateBlueBoxMessageRequest(this, invoice, SenderID, sessionID, SenderName, Message);
7998 }
7999 return true;
8000 case "setregiondebug":
8001 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8002 {
8003 UUID invoice = messagePacket.MethodData.Invoice;
8004 UUID SenderID = messagePacket.AgentData.AgentID;
8005 bool scripted = convertParamStringToBool(messagePacket.ParamList[0].Parameter);
8006 bool collisionEvents = convertParamStringToBool(messagePacket.ParamList[1].Parameter);
8007 bool physics = convertParamStringToBool(messagePacket.ParamList[2].Parameter);
8008
8009 OnEstateDebugRegionRequest(this, invoice, SenderID, scripted, collisionEvents, physics);
8010 }
8011 return true;
8012 case "teleporthomeuser":
8013 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8014 {
8015 UUID invoice = messagePacket.MethodData.Invoice;
8016 UUID SenderID = messagePacket.AgentData.AgentID;
8017 UUID Prey;
8018
8019 UUID.TryParse(Utils.BytesToString(messagePacket.ParamList[1].Parameter), out Prey);
8020
8021 OnEstateTeleportOneUserHomeRequest(this, invoice, SenderID, Prey);
8022 }
8023 return true;
8024 case "teleporthomeallusers":
8025 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8026 {
8027 UUID invoice = messagePacket.MethodData.Invoice;
8028 UUID SenderID = messagePacket.AgentData.AgentID;
8029 OnEstateTeleportAllUsersHomeRequest(this, invoice, SenderID);
8030 }
8031 return true;
8032 case "colliders":
8033 handlerLandStatRequest = OnLandStatRequest;
8034 if (handlerLandStatRequest != null)
8035 {
8036 handlerLandStatRequest(0, 1, 0, "", this);
8037 }
8038 return true;
8039 case "scripts":
8040 handlerLandStatRequest = OnLandStatRequest;
8041 if (handlerLandStatRequest != null)
8042 {
8043 handlerLandStatRequest(0, 0, 0, "", this);
8044 }
8045 return true;
8046 case "terrain":
8047 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8048 {
8049 if (messagePacket.ParamList.Length > 0)
8050 {
8051 if (Utils.BytesToString(messagePacket.ParamList[0].Parameter) == "bake")
8052 {
8053 BakeTerrain handlerBakeTerrain = OnBakeTerrain;
8054 if (handlerBakeTerrain != null)
8055 {
8056 handlerBakeTerrain(this);
8057 }
8058 }
8059 if (Utils.BytesToString(messagePacket.ParamList[0].Parameter) == "download filename")
8060 {
8061 if (messagePacket.ParamList.Length > 1)
8062 {
8063 RequestTerrain handlerRequestTerrain = OnRequestTerrain;
8064 if (handlerRequestTerrain != null)
8065 {
8066 handlerRequestTerrain(this, Utils.BytesToString(messagePacket.ParamList[1].Parameter));
8067 }
8068 }
8069 }
8070 if (Utils.BytesToString(messagePacket.ParamList[0].Parameter) == "upload filename")
8071 {
8072 if (messagePacket.ParamList.Length > 1)
8073 {
8074 RequestTerrain handlerUploadTerrain = OnUploadTerrain;
8075 if (handlerUploadTerrain != null)
8076 {
8077 handlerUploadTerrain(this, Utils.BytesToString(messagePacket.ParamList[1].Parameter));
8078 }
8079 }
8080 }
8081
8082 }
8083
8084
8085 }
8086 return true;
8087
8088 case "estatechangeinfo":
8089 if (((Scene)m_scene).Permissions.CanIssueEstateCommand(AgentId, false))
8090 {
8091 UUID invoice = messagePacket.MethodData.Invoice;
8092 UUID SenderID = messagePacket.AgentData.AgentID;
8093 UInt32 param1 = Convert.ToUInt32(Utils.BytesToString(messagePacket.ParamList[1].Parameter));
8094 UInt32 param2 = Convert.ToUInt32(Utils.BytesToString(messagePacket.ParamList[2].Parameter));
8095
8096 EstateChangeInfo handlerEstateChangeInfo = OnEstateChangeInfo;
8097 if (handlerEstateChangeInfo != null)
8098 {
8099 handlerEstateChangeInfo(this, invoice, SenderID, param1, param2);
8100 }
8101 }
8102 return true;
8103
8104 default:
8105 m_log.Error("EstateOwnerMessage: Unknown method requested\n" + messagePacket);
8106 return true;
8107 }
8108
8109 //int parcelID, uint reportType, uint requestflags, string filter
8110
8111 //lsrp.RequestData.ParcelLocalID;
8112 //lsrp.RequestData.ReportType; // 1 = colliders, 0 = scripts
8113 //lsrp.RequestData.RequestFlags;
8114 //lsrp.RequestData.Filter;
8115
8116// return true;
8117 }
8118
8119 private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack)
8120 {
8121 RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData;
8122
8123 #region Packet Session and User Check
8124 if (m_checkPackets)
8125 {
8126 if (mPacket.SessionID != SessionId ||
8127 mPacket.AgentID != AgentId)
8128 return true;
8129 }
8130 #endregion
8131
8132 RegionInfoRequest handlerRegionInfoRequest = OnRegionInfoRequest;
8133 if (handlerRegionInfoRequest != null)
8134 {
8135 handlerRegionInfoRequest(this);
8136 }
8137 return true;
8138 }
8139
8140 private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack)
8141 {
8142
8143 //EstateCovenantRequestPacket.AgentDataBlock epack =
8144 // ((EstateCovenantRequestPacket)Pack).AgentData;
8145
8146 EstateCovenantRequest handlerEstateCovenantRequest = OnEstateCovenantRequest;
8147 if (handlerEstateCovenantRequest != null)
8148 {
8149 handlerEstateCovenantRequest(this);
8150 }
8151 return true;
8152
8153 }
8154
8155 #endregion Estate Packets
8156
8157 #region GodPackets
8158
8159 private bool HandleRequestGodlikePowers(IClientAPI sender, Packet Pack)
8160 {
8161 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
8162 RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock;
8163 UUID token = rblock.Token;
8164
8165 RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData;
8166
8167 RequestGodlikePowers handlerReqGodlikePowers = OnRequestGodlikePowers;
8168
8169 if (handlerReqGodlikePowers != null)
8170 {
8171 handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, rblock.Godlike, this);
8172 }
8173
8174 return true;
8175 }
8176 private bool HandleGodKickUser(IClientAPI sender, Packet Pack)
8177 {
8178 GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
8179
8180 if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID)
8181 {
8182 GodKickUser handlerGodKickUser = OnGodKickUser;
8183 if (handlerGodKickUser != null)
8184 {
8185 handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID,
8186 gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason);
8187 }
8188 }
8189 else
8190 {
8191 SendAgentAlertMessage("Kick request denied", false);
8192 }
8193 //KickUserPacket kupack = new KickUserPacket();
8194 //KickUserPacket.UserInfoBlock kupackib = kupack.UserInfo;
8195
8196 //kupack.UserInfo.AgentID = gkupack.UserInfo.AgentID;
8197 //kupack.UserInfo.SessionID = gkupack.UserInfo.GodSessionID;
8198
8199 //kupack.TargetBlock.TargetIP = (uint)0;
8200 //kupack.TargetBlock.TargetPort = (ushort)0;
8201 //kupack.UserInfo.Reason = gkupack.UserInfo.Reason;
8202
8203 //OutPacket(kupack, ThrottleOutPacketType.Task);
8204 return true;
8205 }
8206 #endregion GodPackets
8207
8208 #region Economy/Transaction Packets
8209
8210 private bool HandleMoneyBalanceRequest(IClientAPI sender, Packet Pack)
8211 {
8212 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
8213
8214 #region Packet Session and User Check
8215 if (m_checkPackets)
8216 {
8217 if (moneybalancerequestpacket.AgentData.SessionID != SessionId ||
8218 moneybalancerequestpacket.AgentData.AgentID != AgentId)
8219 return true;
8220 }
8221 #endregion
8222
8223 MoneyBalanceRequest handlerMoneyBalanceRequest = OnMoneyBalanceRequest;
8224
8225 if (handlerMoneyBalanceRequest != null)
8226 {
8227 handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID);
8228 }
8229
8230 return true;
8231 }
8232 private bool HandleEconomyDataRequest(IClientAPI sender, Packet Pack)
8233 {
8234 EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest;
8235 if (handlerEconomoyDataRequest != null)
8236 {
8237 handlerEconomoyDataRequest(AgentId);
8238 }
8239 return true;
8240 }
8241 private bool HandleRequestPayPrice(IClientAPI sender, Packet Pack)
8242 {
8243 RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack;
8244
8245 RequestPayPrice handlerRequestPayPrice = OnRequestPayPrice;
8246 if (handlerRequestPayPrice != null)
8247 {
8248 handlerRequestPayPrice(this, requestPayPricePacket.ObjectData.ObjectID);
8249 }
8250 return true;
8251 }
8252 private bool HandleObjectSaleInfo(IClientAPI sender, Packet Pack)
8253 {
8254 ObjectSaleInfoPacket objectSaleInfoPacket = (ObjectSaleInfoPacket)Pack;
8255
8256 #region Packet Session and User Check
8257 if (m_checkPackets)
8258 {
8259 if (objectSaleInfoPacket.AgentData.SessionID != SessionId ||
8260 objectSaleInfoPacket.AgentData.AgentID != AgentId)
8261 return true;
8262 }
8263 #endregion
8264
8265 ObjectSaleInfo handlerObjectSaleInfo = OnObjectSaleInfo;
8266 if (handlerObjectSaleInfo != null)
8267 {
8268 foreach (ObjectSaleInfoPacket.ObjectDataBlock d
8269 in objectSaleInfoPacket.ObjectData)
8270 {
8271 handlerObjectSaleInfo(this,
8272 objectSaleInfoPacket.AgentData.AgentID,
8273 objectSaleInfoPacket.AgentData.SessionID,
8274 d.LocalID,
8275 d.SaleType,
8276 d.SalePrice);
8277 }
8278 }
8279 return true;
8280 }
8281 private bool HandleObjectBuy(IClientAPI sender, Packet Pack)
8282 {
8283 ObjectBuyPacket objectBuyPacket = (ObjectBuyPacket)Pack;
8284
8285 #region Packet Session and User Check
8286 if (m_checkPackets)
8287 {
8288 if (objectBuyPacket.AgentData.SessionID != SessionId ||
8289 objectBuyPacket.AgentData.AgentID != AgentId)
8290 return true;
8291 }
8292 #endregion
8293
8294 ObjectBuy handlerObjectBuy = OnObjectBuy;
8295
8296 if (handlerObjectBuy != null)
8297 {
8298 foreach (ObjectBuyPacket.ObjectDataBlock d
8299 in objectBuyPacket.ObjectData)
8300 {
8301 handlerObjectBuy(this,
8302 objectBuyPacket.AgentData.AgentID,
8303 objectBuyPacket.AgentData.SessionID,
8304 objectBuyPacket.AgentData.GroupID,
8305 objectBuyPacket.AgentData.CategoryID,
8306 d.ObjectLocalID,
8307 d.SaleType,
8308 d.SalePrice);
8309 }
8310 }
8311 return true;
8312 }
8313
8314 #endregion Economy/Transaction Packets
8315
8316 #region Script Packets
8317 private bool HandleGetScriptRunning(IClientAPI sender, Packet Pack)
8318 {
8319 GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
8320
8321 GetScriptRunning handlerGetScriptRunning = OnGetScriptRunning;
8322 if (handlerGetScriptRunning != null)
8323 {
8324 handlerGetScriptRunning(this, scriptRunning.Script.ObjectID, scriptRunning.Script.ItemID);
8325 }
8326 return true;
8327 }
8328 private bool HandleSetScriptRunning(IClientAPI sender, Packet Pack)
8329 {
8330 SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack;
8331
8332 #region Packet Session and User Check
8333 if (m_checkPackets)
8334 {
8335 if (setScriptRunning.AgentData.SessionID != SessionId ||
8336 setScriptRunning.AgentData.AgentID != AgentId)
8337 return true;
8338 }
8339 #endregion
8340
8341 SetScriptRunning handlerSetScriptRunning = OnSetScriptRunning;
8342 if (handlerSetScriptRunning != null)
8343 {
8344 handlerSetScriptRunning(this, setScriptRunning.Script.ObjectID, setScriptRunning.Script.ItemID, setScriptRunning.Script.Running);
8345 }
8346 return true;
8347 }
8348
8349 private bool HandleScriptReset(IClientAPI sender, Packet Pack)
8350 {
8351 ScriptResetPacket scriptResetPacket = (ScriptResetPacket)Pack;
8352
8353 #region Packet Session and User Check
8354 if (m_checkPackets)
8355 {
8356 if (scriptResetPacket.AgentData.SessionID != SessionId ||
8357 scriptResetPacket.AgentData.AgentID != AgentId)
8358 return true;
8359 }
8360 #endregion
8361
8362 ScriptReset handlerScriptReset = OnScriptReset;
8363 if (handlerScriptReset != null)
8364 {
8365 handlerScriptReset(this, scriptResetPacket.Script.ObjectID, scriptResetPacket.Script.ItemID);
8366 }
8367 return true;
8368 }
8369
8370 #endregion Script Packets
8371
8372 #region Gesture Managment
8373
8374 private bool HandleActivateGestures(IClientAPI sender, Packet Pack)
8375 {
8376 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
8377
8378 #region Packet Session and User Check
8379 if (m_checkPackets)
8380 {
8381 if (activateGesturePacket.AgentData.SessionID != SessionId ||
8382 activateGesturePacket.AgentData.AgentID != AgentId)
8383 return true;
8384 }
8385 #endregion
8386
8387 ActivateGesture handlerActivateGesture = OnActivateGesture;
8388 if (handlerActivateGesture != null)
8389 {
8390 handlerActivateGesture(this,
8391 activateGesturePacket.Data[0].AssetID,
8392 activateGesturePacket.Data[0].ItemID);
8393 }
8394 else m_log.Error("Null pointer for activateGesture");
8395
8396 return true;
8397 }
8398 private bool HandleDeactivateGestures(IClientAPI sender, Packet Pack)
8399 {
8400 DeactivateGesturesPacket deactivateGesturePacket = (DeactivateGesturesPacket)Pack;
8401
8402 #region Packet Session and User Check
8403 if (m_checkPackets)
8404 {
8405 if (deactivateGesturePacket.AgentData.SessionID != SessionId ||
8406 deactivateGesturePacket.AgentData.AgentID != AgentId)
8407 return true;
8408 }
8409 #endregion
8410
8411 DeactivateGesture handlerDeactivateGesture = OnDeactivateGesture;
8412 if (handlerDeactivateGesture != null)
8413 {
8414 handlerDeactivateGesture(this, deactivateGesturePacket.Data[0].ItemID);
8415 }
8416 return true;
8417 }
8418 private bool HandleObjectOwner(IClientAPI sender, Packet Pack)
8419 {
8420 ObjectOwnerPacket objectOwnerPacket = (ObjectOwnerPacket)Pack;
8421
8422 #region Packet Session and User Check
8423 if (m_checkPackets)
8424 {
8425 if (objectOwnerPacket.AgentData.SessionID != SessionId ||
8426 objectOwnerPacket.AgentData.AgentID != AgentId)
8427 return true;
8428 }
8429 #endregion
8430
8431 List<uint> localIDs = new List<uint>();
8432
8433 foreach (ObjectOwnerPacket.ObjectDataBlock d in objectOwnerPacket.ObjectData)
8434 localIDs.Add(d.ObjectLocalID);
8435
8436 ObjectOwner handlerObjectOwner = OnObjectOwner;
8437 if (handlerObjectOwner != null)
8438 {
8439 handlerObjectOwner(this, objectOwnerPacket.HeaderData.OwnerID, objectOwnerPacket.HeaderData.GroupID, localIDs);
8440 }
8441 return true;
8442 }
8443
8444 #endregion Gesture Managment
8445
8446 private bool HandleAgentFOV(IClientAPI sender, Packet Pack)
8447 {
8448 AgentFOVPacket fovPacket = (AgentFOVPacket)Pack;
8449
8450 if (fovPacket.FOVBlock.GenCounter > m_agentFOVCounter)
8451 {
8452 m_agentFOVCounter = fovPacket.FOVBlock.GenCounter;
8453 AgentFOV handlerAgentFOV = OnAgentFOV;
8454 if (handlerAgentFOV != null)
8455 {
8456 handlerAgentFOV(this, fovPacket.FOVBlock.VerticalAngle);
8457 }
8458 }
8459 return true;
8460 }
8461
8462 #region unimplemented handlers
8463
8464 private bool HandleViewerStats(IClientAPI sender, Packet Pack)
8465 {
8466 // TODO: handle this packet
8467 //m_log.Warn("[CLIENT]: unhandled ViewerStats packet");
8468 return true;
8469 }
8470
8471 private bool HandleMapItemRequest(IClientAPI sender, Packet Pack)
8472 {
8473 MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack;
8474
8475 #region Packet Session and User Check
8476 if (m_checkPackets)
8477 {
8478 if (mirpk.AgentData.SessionID != SessionId ||
8479 mirpk.AgentData.AgentID != AgentId)
8480 return true;
8481 }
8482 #endregion
8483
8484 //m_log.Debug(mirpk.ToString());
8485 MapItemRequest handlerMapItemRequest = OnMapItemRequest;
8486 if (handlerMapItemRequest != null)
8487 {
8488 handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID,
8489 mirpk.AgentData.Godlike, mirpk.RequestData.ItemType,
8490 mirpk.RequestData.RegionHandle);
8491
8492 }
8493 return true;
8494 }
8495
8496 private bool HandleTransferAbort(IClientAPI sender, Packet Pack)
8497 {
8498 return true;
8499 }
8500
8501 private bool HandleMuteListRequest(IClientAPI sender, Packet Pack)
8502 {
8503 MuteListRequestPacket muteListRequest =
8504 (MuteListRequestPacket)Pack;
8505
8506 #region Packet Session and User Check
8507 if (m_checkPackets)
8508 {
8509 if (muteListRequest.AgentData.SessionID != SessionId ||
8510 muteListRequest.AgentData.AgentID != AgentId)
8511 return true;
8512 }
8513 #endregion
8514
8515 MuteListRequest handlerMuteListRequest = OnMuteListRequest;
8516 if (handlerMuteListRequest != null)
8517 {
8518 handlerMuteListRequest(this, muteListRequest.MuteData.MuteCRC);
8519 }
8520 else
8521 {
8522 SendUseCachedMuteList();
8523 }
8524 return true;
8525 }
8526
8527 private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack)
8528 {
8529 return true;
8530 }
8531
8532 private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack)
8533 {
8534 return true;
8535 }
8536
8537 private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack)
8538 {
8539 return true;
8540 }
8541
8542 #endregion unimplemented handlers
8543
8544 #region Dir handlers
8545
8546 private bool HandleDirPlacesQuery(IClientAPI sender, Packet Pack)
8547 {
8548 DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack;
8549 //m_log.Debug(dirPlacesQueryPacket.ToString());
8550
8551 #region Packet Session and User Check
8552 if (m_checkPackets)
8553 {
8554 if (dirPlacesQueryPacket.AgentData.SessionID != SessionId ||
8555 dirPlacesQueryPacket.AgentData.AgentID != AgentId)
8556 return true;
8557 }
8558 #endregion
8559
8560 DirPlacesQuery handlerDirPlacesQuery = OnDirPlacesQuery;
8561 if (handlerDirPlacesQuery != null)
8562 {
8563 handlerDirPlacesQuery(this,
8564 dirPlacesQueryPacket.QueryData.QueryID,
8565 Utils.BytesToString(
8566 dirPlacesQueryPacket.QueryData.QueryText),
8567 (int)dirPlacesQueryPacket.QueryData.QueryFlags,
8568 (int)dirPlacesQueryPacket.QueryData.Category,
8569 Utils.BytesToString(
8570 dirPlacesQueryPacket.QueryData.SimName),
8571 dirPlacesQueryPacket.QueryData.QueryStart);
8572 }
8573 return true;
8574 }
8575
8576 private bool HandleDirFindQuery(IClientAPI sender, Packet Pack)
8577 {
8578 DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack;
8579
8580 #region Packet Session and User Check
8581 if (m_checkPackets)
8582 {
8583 if (dirFindQueryPacket.AgentData.SessionID != SessionId ||
8584 dirFindQueryPacket.AgentData.AgentID != AgentId)
8585 return true;
8586 }
8587 #endregion
8588
8589 DirFindQuery handlerDirFindQuery = OnDirFindQuery;
8590 if (handlerDirFindQuery != null)
8591 {
8592 handlerDirFindQuery(this,
8593 dirFindQueryPacket.QueryData.QueryID,
8594 Utils.BytesToString(
8595 dirFindQueryPacket.QueryData.QueryText),
8596 dirFindQueryPacket.QueryData.QueryFlags,
8597 dirFindQueryPacket.QueryData.QueryStart);
8598 }
8599 return true;
8600 }
8601
8602 private bool HandleDirLandQuery(IClientAPI sender, Packet Pack)
8603 {
8604 DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack;
8605
8606 #region Packet Session and User Check
8607 if (m_checkPackets)
8608 {
8609 if (dirLandQueryPacket.AgentData.SessionID != SessionId ||
8610 dirLandQueryPacket.AgentData.AgentID != AgentId)
8611 return true;
8612 }
8613 #endregion
8614
8615 DirLandQuery handlerDirLandQuery = OnDirLandQuery;
8616 if (handlerDirLandQuery != null)
8617 {
8618 handlerDirLandQuery(this,
8619 dirLandQueryPacket.QueryData.QueryID,
8620 dirLandQueryPacket.QueryData.QueryFlags,
8621 dirLandQueryPacket.QueryData.SearchType,
8622 dirLandQueryPacket.QueryData.Price,
8623 dirLandQueryPacket.QueryData.Area,
8624 dirLandQueryPacket.QueryData.QueryStart);
8625 }
8626 return true;
8627 }
8628
8629 private bool HandleDirPopularQuery(IClientAPI sender, Packet Pack)
8630 {
8631 DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack;
8632
8633 #region Packet Session and User Check
8634 if (m_checkPackets)
8635 {
8636 if (dirPopularQueryPacket.AgentData.SessionID != SessionId ||
8637 dirPopularQueryPacket.AgentData.AgentID != AgentId)
8638 return true;
8639 }
8640 #endregion
8641
8642 DirPopularQuery handlerDirPopularQuery = OnDirPopularQuery;
8643 if (handlerDirPopularQuery != null)
8644 {
8645 handlerDirPopularQuery(this,
8646 dirPopularQueryPacket.QueryData.QueryID,
8647 dirPopularQueryPacket.QueryData.QueryFlags);
8648 }
8649 return true;
8650 }
8651
8652 private bool HandleDirClassifiedQuery(IClientAPI sender, Packet Pack)
8653 {
8654 DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack;
8655
8656 #region Packet Session and User Check
8657 if (m_checkPackets)
8658 {
8659 if (dirClassifiedQueryPacket.AgentData.SessionID != SessionId ||
8660 dirClassifiedQueryPacket.AgentData.AgentID != AgentId)
8661 return true;
8662 }
8663 #endregion
8664
8665 DirClassifiedQuery handlerDirClassifiedQuery = OnDirClassifiedQuery;
8666 if (handlerDirClassifiedQuery != null)
8667 {
8668 handlerDirClassifiedQuery(this,
8669 dirClassifiedQueryPacket.QueryData.QueryID,
8670 Utils.BytesToString(
8671 dirClassifiedQueryPacket.QueryData.QueryText),
8672 dirClassifiedQueryPacket.QueryData.QueryFlags,
8673 dirClassifiedQueryPacket.QueryData.Category,
8674 dirClassifiedQueryPacket.QueryData.QueryStart);
8675 }
8676 return true;
8677 }
8678
8679 private bool HandleEventInfoRequest(IClientAPI sender, Packet Pack)
8680 {
8681 EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack;
8682
8683 #region Packet Session and User Check
8684 if (m_checkPackets)
8685 {
8686 if (eventInfoRequestPacket.AgentData.SessionID != SessionId ||
8687 eventInfoRequestPacket.AgentData.AgentID != AgentId)
8688 return true;
8689 }
8690 #endregion
8691
8692 if (OnEventInfoRequest != null)
8693 {
8694 OnEventInfoRequest(this, eventInfoRequestPacket.EventData.EventID);
8695 }
8696 return true;
8697 }
8698
8699 #endregion
8700
8701 #region Calling Card
8702
8703 private bool HandleOfferCallingCard(IClientAPI sender, Packet Pack)
8704 {
8705 OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack;
8706
8707 #region Packet Session and User Check
8708 if (m_checkPackets)
8709 {
8710 if (offerCallingCardPacket.AgentData.SessionID != SessionId ||
8711 offerCallingCardPacket.AgentData.AgentID != AgentId)
8712 return true;
8713 }
8714 #endregion
8715
8716 if (OnOfferCallingCard != null)
8717 {
8718 OnOfferCallingCard(this,
8719 offerCallingCardPacket.AgentBlock.DestID,
8720 offerCallingCardPacket.AgentBlock.TransactionID);
8721 }
8722 return true;
8723 }
8724
8725 private bool HandleAcceptCallingCard(IClientAPI sender, Packet Pack)
8726 {
8727 AcceptCallingCardPacket acceptCallingCardPacket = (AcceptCallingCardPacket)Pack;
8728
8729 #region Packet Session and User Check
8730 if (m_checkPackets)
8731 {
8732 if (acceptCallingCardPacket.AgentData.SessionID != SessionId ||
8733 acceptCallingCardPacket.AgentData.AgentID != AgentId)
8734 return true;
8735 }
8736 #endregion
8737
8738 // according to http://wiki.secondlife.com/wiki/AcceptCallingCard FolderData should
8739 // contain exactly one entry
8740 if (OnAcceptCallingCard != null && acceptCallingCardPacket.FolderData.Length > 0)
8741 {
8742 OnAcceptCallingCard(this,
8743 acceptCallingCardPacket.TransactionBlock.TransactionID,
8744 acceptCallingCardPacket.FolderData[0].FolderID);
8745 }
8746 return true;
8747 }
8748
8749 private bool HandleDeclineCallingCard(IClientAPI sender, Packet Pack)
8750 {
8751 DeclineCallingCardPacket declineCallingCardPacket = (DeclineCallingCardPacket)Pack;
8752
8753 #region Packet Session and User Check
8754 if (m_checkPackets)
8755 {
8756 if (declineCallingCardPacket.AgentData.SessionID != SessionId ||
8757 declineCallingCardPacket.AgentData.AgentID != AgentId)
8758 return true;
8759 }
8760 #endregion
8761
8762 if (OnDeclineCallingCard != null)
8763 {
8764 OnDeclineCallingCard(this,
8765 declineCallingCardPacket.TransactionBlock.TransactionID);
8766 }
8767 return true;
8768 }
8769
8770 #endregion Calling Card
8771
8772 #region Groups
8773
8774 private bool HandleActivateGroup(IClientAPI sender, Packet Pack)
8775 {
8776 ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack;
8777
8778 #region Packet Session and User Check
8779 if (m_checkPackets)
8780 {
8781 if (activateGroupPacket.AgentData.SessionID != SessionId ||
8782 activateGroupPacket.AgentData.AgentID != AgentId)
8783 return true;
8784 }
8785 #endregion
8786
8787 if (m_GroupsModule != null)
8788 {
8789 m_GroupsModule.ActivateGroup(this, activateGroupPacket.AgentData.GroupID);
8790 m_GroupsModule.SendAgentGroupDataUpdate(this);
8791 }
8792 return true;
8793
8794 }
8795
8796 private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack)
8797 {
8798 GroupTitlesRequestPacket groupTitlesRequest =
8799 (GroupTitlesRequestPacket)Pack;
8800
8801 #region Packet Session and User Check
8802 if (m_checkPackets)
8803 {
8804 if (groupTitlesRequest.AgentData.SessionID != SessionId ||
8805 groupTitlesRequest.AgentData.AgentID != AgentId)
8806 return true;
8807 }
8808 #endregion
8809
8810 if (m_GroupsModule != null)
8811 {
8812 GroupTitlesReplyPacket groupTitlesReply = (GroupTitlesReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupTitlesReply);
8813
8814 groupTitlesReply.AgentData =
8815 new GroupTitlesReplyPacket.AgentDataBlock();
8816
8817 groupTitlesReply.AgentData.AgentID = AgentId;
8818 groupTitlesReply.AgentData.GroupID =
8819 groupTitlesRequest.AgentData.GroupID;
8820
8821 groupTitlesReply.AgentData.RequestID =
8822 groupTitlesRequest.AgentData.RequestID;
8823
8824 List<GroupTitlesData> titles =
8825 m_GroupsModule.GroupTitlesRequest(this,
8826 groupTitlesRequest.AgentData.GroupID);
8827
8828 groupTitlesReply.GroupData =
8829 new GroupTitlesReplyPacket.GroupDataBlock[titles.Count];
8830
8831 int i = 0;
8832 foreach (GroupTitlesData d in titles)
8833 {
8834 groupTitlesReply.GroupData[i] =
8835 new GroupTitlesReplyPacket.GroupDataBlock();
8836
8837 groupTitlesReply.GroupData[i].Title =
8838 Util.StringToBytes256(d.Name);
8839 groupTitlesReply.GroupData[i].RoleID =
8840 d.UUID;
8841 groupTitlesReply.GroupData[i].Selected =
8842 d.Selected;
8843 i++;
8844 }
8845
8846 OutPacket(groupTitlesReply, ThrottleOutPacketType.Task);
8847 }
8848 return true;
8849 }
8850 private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack)
8851 {
8852 GroupProfileRequestPacket groupProfileRequest =
8853 (GroupProfileRequestPacket)Pack;
8854
8855 #region Packet Session and User Check
8856 if (m_checkPackets)
8857 {
8858 if (groupProfileRequest.AgentData.SessionID != SessionId ||
8859 groupProfileRequest.AgentData.AgentID != AgentId)
8860 return true;
8861 }
8862 #endregion
8863
8864 if (m_GroupsModule != null)
8865 {
8866 GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply);
8867
8868 groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock();
8869 groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock();
8870 groupProfileReply.AgentData.AgentID = AgentId;
8871
8872 GroupProfileData d = m_GroupsModule.GroupProfileRequest(this,
8873 groupProfileRequest.GroupData.GroupID);
8874
8875 groupProfileReply.GroupData.GroupID = d.GroupID;
8876 groupProfileReply.GroupData.Name = Util.StringToBytes256(d.Name);
8877 groupProfileReply.GroupData.Charter = Util.StringToBytes1024(d.Charter);
8878 groupProfileReply.GroupData.ShowInList = d.ShowInList;
8879 groupProfileReply.GroupData.MemberTitle = Util.StringToBytes256(d.MemberTitle);
8880 groupProfileReply.GroupData.PowersMask = d.PowersMask;
8881 groupProfileReply.GroupData.InsigniaID = d.InsigniaID;
8882 groupProfileReply.GroupData.FounderID = d.FounderID;
8883 groupProfileReply.GroupData.MembershipFee = d.MembershipFee;
8884 groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment;
8885 groupProfileReply.GroupData.Money = d.Money;
8886 groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount;
8887 groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount;
8888 groupProfileReply.GroupData.AllowPublish = d.AllowPublish;
8889 groupProfileReply.GroupData.MaturePublish = d.MaturePublish;
8890 groupProfileReply.GroupData.OwnerRole = d.OwnerRole;
8891
8892 OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
8893 }
8894 return true;
8895 }
8896 private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack)
8897 {
8898 GroupMembersRequestPacket groupMembersRequestPacket =
8899 (GroupMembersRequestPacket)Pack;
8900
8901 #region Packet Session and User Check
8902 if (m_checkPackets)
8903 {
8904 if (groupMembersRequestPacket.AgentData.SessionID != SessionId ||
8905 groupMembersRequestPacket.AgentData.AgentID != AgentId)
8906 return true;
8907 }
8908 #endregion
8909
8910 if (m_GroupsModule != null)
8911 {
8912 List<GroupMembersData> members =
8913 m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
8914
8915 int memberCount = members.Count;
8916
8917 while (true)
8918 {
8919 int blockCount = members.Count;
8920 if (blockCount > 40)
8921 blockCount = 40;
8922
8923 GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
8924
8925 groupMembersReply.AgentData =
8926 new GroupMembersReplyPacket.AgentDataBlock();
8927 groupMembersReply.GroupData =
8928 new GroupMembersReplyPacket.GroupDataBlock();
8929 groupMembersReply.MemberData =
8930 new GroupMembersReplyPacket.MemberDataBlock[
8931 blockCount];
8932
8933 groupMembersReply.AgentData.AgentID = AgentId;
8934 groupMembersReply.GroupData.GroupID =
8935 groupMembersRequestPacket.GroupData.GroupID;
8936 groupMembersReply.GroupData.RequestID =
8937 groupMembersRequestPacket.GroupData.RequestID;
8938 groupMembersReply.GroupData.MemberCount = memberCount;
8939
8940 for (int i = 0; i < blockCount; i++)
8941 {
8942 GroupMembersData m = members[0];
8943 members.RemoveAt(0);
8944
8945 groupMembersReply.MemberData[i] =
8946 new GroupMembersReplyPacket.MemberDataBlock();
8947 groupMembersReply.MemberData[i].AgentID =
8948 m.AgentID;
8949 groupMembersReply.MemberData[i].Contribution =
8950 m.Contribution;
8951 groupMembersReply.MemberData[i].OnlineStatus =
8952 Util.StringToBytes256(m.OnlineStatus);
8953 groupMembersReply.MemberData[i].AgentPowers =
8954 m.AgentPowers;
8955 groupMembersReply.MemberData[i].Title =
8956 Util.StringToBytes256(m.Title);
8957 groupMembersReply.MemberData[i].IsOwner =
8958 m.IsOwner;
8959 }
8960 OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
8961 if (members.Count == 0)
8962 return true;
8963 }
8964 }
8965 return true;
8966 }
8967 private bool HandleGroupRoleDataRequest(IClientAPI sender, Packet Pack)
8968 {
8969 GroupRoleDataRequestPacket groupRolesRequest =
8970 (GroupRoleDataRequestPacket)Pack;
8971
8972 #region Packet Session and User Check
8973 if (m_checkPackets)
8974 {
8975 if (groupRolesRequest.AgentData.SessionID != SessionId ||
8976 groupRolesRequest.AgentData.AgentID != AgentId)
8977 return true;
8978 }
8979 #endregion
8980
8981 if (m_GroupsModule != null)
8982 {
8983 GroupRoleDataReplyPacket groupRolesReply = (GroupRoleDataReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleDataReply);
8984
8985 groupRolesReply.AgentData =
8986 new GroupRoleDataReplyPacket.AgentDataBlock();
8987
8988 groupRolesReply.AgentData.AgentID = AgentId;
8989
8990 groupRolesReply.GroupData =
8991 new GroupRoleDataReplyPacket.GroupDataBlock();
8992
8993 groupRolesReply.GroupData.GroupID =
8994 groupRolesRequest.GroupData.GroupID;
8995
8996 groupRolesReply.GroupData.RequestID =
8997 groupRolesRequest.GroupData.RequestID;
8998
8999 List<GroupRolesData> titles =
9000 m_GroupsModule.GroupRoleDataRequest(this,
9001 groupRolesRequest.GroupData.GroupID);
9002
9003 groupRolesReply.GroupData.RoleCount =
9004 titles.Count;
9005
9006 groupRolesReply.RoleData =
9007 new GroupRoleDataReplyPacket.RoleDataBlock[titles.Count];
9008
9009 int i = 0;
9010 foreach (GroupRolesData d in titles)
9011 {
9012 groupRolesReply.RoleData[i] =
9013 new GroupRoleDataReplyPacket.RoleDataBlock();
9014
9015 groupRolesReply.RoleData[i].RoleID =
9016 d.RoleID;
9017 groupRolesReply.RoleData[i].Name =
9018 Util.StringToBytes256(d.Name);
9019 groupRolesReply.RoleData[i].Title =
9020 Util.StringToBytes256(d.Title);
9021 groupRolesReply.RoleData[i].Description =
9022 Util.StringToBytes1024(d.Description);
9023 groupRolesReply.RoleData[i].Powers =
9024 d.Powers;
9025 groupRolesReply.RoleData[i].Members =
9026 (uint)d.Members;
9027
9028 i++;
9029 }
9030
9031 OutPacket(groupRolesReply, ThrottleOutPacketType.Task);
9032 }
9033 return true;
9034 }
9035 private bool HandleGroupRoleMembersRequest(IClientAPI sender, Packet Pack)
9036 {
9037 GroupRoleMembersRequestPacket groupRoleMembersRequest =
9038 (GroupRoleMembersRequestPacket)Pack;
9039
9040 #region Packet Session and User Check
9041 if (m_checkPackets)
9042 {
9043 if (groupRoleMembersRequest.AgentData.SessionID != SessionId ||
9044 groupRoleMembersRequest.AgentData.AgentID != AgentId)
9045 return true;
9046 }
9047 #endregion
9048
9049 if (m_GroupsModule != null)
9050 {
9051 List<GroupRoleMembersData> mappings =
9052 m_GroupsModule.GroupRoleMembersRequest(this,
9053 groupRoleMembersRequest.GroupData.GroupID);
9054
9055 int mappingsCount = mappings.Count;
9056
9057 while (mappings.Count > 0)
9058 {
9059 int pairs = mappings.Count;
9060 if (pairs > 32)
9061 pairs = 32;
9062
9063 GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply);
9064 groupRoleMembersReply.AgentData =
9065 new GroupRoleMembersReplyPacket.AgentDataBlock();
9066 groupRoleMembersReply.AgentData.AgentID =
9067 AgentId;
9068 groupRoleMembersReply.AgentData.GroupID =
9069 groupRoleMembersRequest.GroupData.GroupID;
9070 groupRoleMembersReply.AgentData.RequestID =
9071 groupRoleMembersRequest.GroupData.RequestID;
9072
9073 groupRoleMembersReply.AgentData.TotalPairs =
9074 (uint)mappingsCount;
9075
9076 groupRoleMembersReply.MemberData =
9077 new GroupRoleMembersReplyPacket.MemberDataBlock[pairs];
9078
9079 for (int i = 0; i < pairs; i++)
9080 {
9081 GroupRoleMembersData d = mappings[0];
9082 mappings.RemoveAt(0);
9083
9084 groupRoleMembersReply.MemberData[i] =
9085 new GroupRoleMembersReplyPacket.MemberDataBlock();
9086
9087 groupRoleMembersReply.MemberData[i].RoleID =
9088 d.RoleID;
9089 groupRoleMembersReply.MemberData[i].MemberID =
9090 d.MemberID;
9091 }
9092
9093 OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task);
9094 }
9095 }
9096 return true;
9097 }
9098 private bool HandleCreateGroupRequest(IClientAPI sender, Packet Pack)
9099 {
9100 CreateGroupRequestPacket createGroupRequest =
9101 (CreateGroupRequestPacket)Pack;
9102
9103 #region Packet Session and User Check
9104 if (m_checkPackets)
9105 {
9106 if (createGroupRequest.AgentData.SessionID != SessionId ||
9107 createGroupRequest.AgentData.AgentID != AgentId)
9108 return true;
9109 }
9110 #endregion
9111
9112 if (m_GroupsModule != null)
9113 {
9114 m_GroupsModule.CreateGroup(this,
9115 Utils.BytesToString(createGroupRequest.GroupData.Name),
9116 Utils.BytesToString(createGroupRequest.GroupData.Charter),
9117 createGroupRequest.GroupData.ShowInList,
9118 createGroupRequest.GroupData.InsigniaID,
9119 createGroupRequest.GroupData.MembershipFee,
9120 createGroupRequest.GroupData.OpenEnrollment,
9121 createGroupRequest.GroupData.AllowPublish,
9122 createGroupRequest.GroupData.MaturePublish);
9123 }
9124 return true;
9125 }
9126 private bool HandleUpdateGroupInfo(IClientAPI sender, Packet Pack)
9127 {
9128 UpdateGroupInfoPacket updateGroupInfo =
9129 (UpdateGroupInfoPacket)Pack;
9130
9131 #region Packet Session and User Check
9132 if (m_checkPackets)
9133 {
9134 if (updateGroupInfo.AgentData.SessionID != SessionId ||
9135 updateGroupInfo.AgentData.AgentID != AgentId)
9136 return true;
9137 }
9138 #endregion
9139
9140 if (m_GroupsModule != null)
9141 {
9142 m_GroupsModule.UpdateGroupInfo(this,
9143 updateGroupInfo.GroupData.GroupID,
9144 Utils.BytesToString(updateGroupInfo.GroupData.Charter),
9145 updateGroupInfo.GroupData.ShowInList,
9146 updateGroupInfo.GroupData.InsigniaID,
9147 updateGroupInfo.GroupData.MembershipFee,
9148 updateGroupInfo.GroupData.OpenEnrollment,
9149 updateGroupInfo.GroupData.AllowPublish,
9150 updateGroupInfo.GroupData.MaturePublish);
9151 }
9152
9153 return true;
9154 }
9155 private bool HandleSetGroupAcceptNotices(IClientAPI sender, Packet Pack)
9156 {
9157 SetGroupAcceptNoticesPacket setGroupAcceptNotices =
9158 (SetGroupAcceptNoticesPacket)Pack;
9159
9160 #region Packet Session and User Check
9161 if (m_checkPackets)
9162 {
9163 if (setGroupAcceptNotices.AgentData.SessionID != SessionId ||
9164 setGroupAcceptNotices.AgentData.AgentID != AgentId)
9165 return true;
9166 }
9167 #endregion
9168
9169 if (m_GroupsModule != null)
9170 {
9171 m_GroupsModule.SetGroupAcceptNotices(this,
9172 setGroupAcceptNotices.Data.GroupID,
9173 setGroupAcceptNotices.Data.AcceptNotices,
9174 setGroupAcceptNotices.NewData.ListInProfile);
9175 }
9176
9177 return true;
9178 }
9179 private bool HandleGroupTitleUpdate(IClientAPI sender, Packet Pack)
9180 {
9181 GroupTitleUpdatePacket groupTitleUpdate =
9182 (GroupTitleUpdatePacket)Pack;
9183
9184 #region Packet Session and User Check
9185 if (m_checkPackets)
9186 {
9187 if (groupTitleUpdate.AgentData.SessionID != SessionId ||
9188 groupTitleUpdate.AgentData.AgentID != AgentId)
9189 return true;
9190 }
9191 #endregion
9192
9193 if (m_GroupsModule != null)
9194 {
9195 m_GroupsModule.GroupTitleUpdate(this,
9196 groupTitleUpdate.AgentData.GroupID,
9197 groupTitleUpdate.AgentData.TitleRoleID);
9198 }
9199
9200 return true;
9201 }
9202 private bool HandleParcelDeedToGroup(IClientAPI sender, Packet Pack)
9203 {
9204 ParcelDeedToGroupPacket parcelDeedToGroup = (ParcelDeedToGroupPacket)Pack;
9205 if (m_GroupsModule != null)
9206 {
9207 ParcelDeedToGroup handlerParcelDeedToGroup = OnParcelDeedToGroup;
9208 if (handlerParcelDeedToGroup != null)
9209 {
9210 handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID, this);
9211
9212 }
9213 }
9214
9215 return true;
9216 }
9217 private bool HandleGroupNoticesListRequest(IClientAPI sender, Packet Pack)
9218 {
9219 GroupNoticesListRequestPacket groupNoticesListRequest =
9220 (GroupNoticesListRequestPacket)Pack;
9221
9222 #region Packet Session and User Check
9223 if (m_checkPackets)
9224 {
9225 if (groupNoticesListRequest.AgentData.SessionID != SessionId ||
9226 groupNoticesListRequest.AgentData.AgentID != AgentId)
9227 return true;
9228 }
9229 #endregion
9230
9231 if (m_GroupsModule != null)
9232 {
9233 GroupNoticeData[] gn =
9234 m_GroupsModule.GroupNoticesListRequest(this,
9235 groupNoticesListRequest.Data.GroupID);
9236
9237 GroupNoticesListReplyPacket groupNoticesListReply = (GroupNoticesListReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupNoticesListReply);
9238 groupNoticesListReply.AgentData =
9239 new GroupNoticesListReplyPacket.AgentDataBlock();
9240 groupNoticesListReply.AgentData.AgentID = AgentId;
9241 groupNoticesListReply.AgentData.GroupID = groupNoticesListRequest.Data.GroupID;
9242
9243 groupNoticesListReply.Data = new GroupNoticesListReplyPacket.DataBlock[gn.Length];
9244
9245 int i = 0;
9246 foreach (GroupNoticeData g in gn)
9247 {
9248 groupNoticesListReply.Data[i] = new GroupNoticesListReplyPacket.DataBlock();
9249 groupNoticesListReply.Data[i].NoticeID =
9250 g.NoticeID;
9251 groupNoticesListReply.Data[i].Timestamp =
9252 g.Timestamp;
9253 groupNoticesListReply.Data[i].FromName =
9254 Util.StringToBytes256(g.FromName);
9255 groupNoticesListReply.Data[i].Subject =
9256 Util.StringToBytes256(g.Subject);
9257 groupNoticesListReply.Data[i].HasAttachment =
9258 g.HasAttachment;
9259 groupNoticesListReply.Data[i].AssetType =
9260 g.AssetType;
9261 i++;
9262 }
9263
9264 OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task);
9265 }
9266
9267 return true;
9268 }
9269 private bool HandleGroupNoticeRequest(IClientAPI sender, Packet Pack)
9270 {
9271 GroupNoticeRequestPacket groupNoticeRequest =
9272 (GroupNoticeRequestPacket)Pack;
9273
9274 #region Packet Session and User Check
9275 if (m_checkPackets)
9276 {
9277 if (groupNoticeRequest.AgentData.SessionID != SessionId ||
9278 groupNoticeRequest.AgentData.AgentID != AgentId)
9279 return true;
9280 }
9281 #endregion
9282
9283 if (m_GroupsModule != null)
9284 {
9285 m_GroupsModule.GroupNoticeRequest(this,
9286 groupNoticeRequest.Data.GroupNoticeID);
9287 }
9288 return true;
9289 }
9290 private bool HandleGroupRoleUpdate(IClientAPI sender, Packet Pack)
9291 {
9292 GroupRoleUpdatePacket groupRoleUpdate =
9293 (GroupRoleUpdatePacket)Pack;
9294
9295 #region Packet Session and User Check
9296 if (m_checkPackets)
9297 {
9298 if (groupRoleUpdate.AgentData.SessionID != SessionId ||
9299 groupRoleUpdate.AgentData.AgentID != AgentId)
9300 return true;
9301 }
9302 #endregion
9303
9304 if (m_GroupsModule != null)
9305 {
9306 foreach (GroupRoleUpdatePacket.RoleDataBlock d in
9307 groupRoleUpdate.RoleData)
9308 {
9309 m_GroupsModule.GroupRoleUpdate(this,
9310 groupRoleUpdate.AgentData.GroupID,
9311 d.RoleID,
9312 Utils.BytesToString(d.Name),
9313 Utils.BytesToString(d.Description),
9314 Utils.BytesToString(d.Title),
9315 d.Powers,
9316 d.UpdateType);
9317 }
9318 m_GroupsModule.NotifyChange(groupRoleUpdate.AgentData.GroupID);
9319 }
9320 return true;
9321 }
9322 private bool HandleGroupRoleChanges(IClientAPI sender, Packet Pack)
9323 {
9324 GroupRoleChangesPacket groupRoleChanges =
9325 (GroupRoleChangesPacket)Pack;
9326
9327 #region Packet Session and User Check
9328 if (m_checkPackets)
9329 {
9330 if (groupRoleChanges.AgentData.SessionID != SessionId ||
9331 groupRoleChanges.AgentData.AgentID != AgentId)
9332 return true;
9333 }
9334 #endregion
9335
9336 if (m_GroupsModule != null)
9337 {
9338 foreach (GroupRoleChangesPacket.RoleChangeBlock d in
9339 groupRoleChanges.RoleChange)
9340 {
9341 m_GroupsModule.GroupRoleChanges(this,
9342 groupRoleChanges.AgentData.GroupID,
9343 d.RoleID,
9344 d.MemberID,
9345 d.Change);
9346 }
9347 m_GroupsModule.NotifyChange(groupRoleChanges.AgentData.GroupID);
9348 }
9349 return true;
9350 }
9351 private bool HandleJoinGroupRequest(IClientAPI sender, Packet Pack)
9352 {
9353 JoinGroupRequestPacket joinGroupRequest =
9354 (JoinGroupRequestPacket)Pack;
9355
9356 #region Packet Session and User Check
9357 if (m_checkPackets)
9358 {
9359 if (joinGroupRequest.AgentData.SessionID != SessionId ||
9360 joinGroupRequest.AgentData.AgentID != AgentId)
9361 return true;
9362 }
9363 #endregion
9364
9365 if (m_GroupsModule != null)
9366 {
9367 m_GroupsModule.JoinGroupRequest(this,
9368 joinGroupRequest.GroupData.GroupID);
9369 }
9370 return true;
9371 }
9372 private bool HandleLeaveGroupRequest(IClientAPI sender, Packet Pack)
9373 {
9374 LeaveGroupRequestPacket leaveGroupRequest =
9375 (LeaveGroupRequestPacket)Pack;
9376
9377 #region Packet Session and User Check
9378 if (m_checkPackets)
9379 {
9380 if (leaveGroupRequest.AgentData.SessionID != SessionId ||
9381 leaveGroupRequest.AgentData.AgentID != AgentId)
9382 return true;
9383 }
9384 #endregion
9385
9386 if (m_GroupsModule != null)
9387 {
9388 m_GroupsModule.LeaveGroupRequest(this,
9389 leaveGroupRequest.GroupData.GroupID);
9390 }
9391 return true;
9392 }
9393 private bool HandleEjectGroupMemberRequest(IClientAPI sender, Packet Pack)
9394 {
9395 EjectGroupMemberRequestPacket ejectGroupMemberRequest =
9396 (EjectGroupMemberRequestPacket)Pack;
9397
9398 #region Packet Session and User Check
9399 if (m_checkPackets)
9400 {
9401 if (ejectGroupMemberRequest.AgentData.SessionID != SessionId ||
9402 ejectGroupMemberRequest.AgentData.AgentID != AgentId)
9403 return true;
9404 }
9405 #endregion
9406
9407 if (m_GroupsModule != null)
9408 {
9409 foreach (EjectGroupMemberRequestPacket.EjectDataBlock e
9410 in ejectGroupMemberRequest.EjectData)
9411 {
9412 m_GroupsModule.EjectGroupMemberRequest(this,
9413 ejectGroupMemberRequest.GroupData.GroupID,
9414 e.EjecteeID);
9415 }
9416 }
9417 return true;
9418 }
9419 private bool HandleInviteGroupRequest(IClientAPI sender, Packet Pack)
9420 {
9421 InviteGroupRequestPacket inviteGroupRequest =
9422 (InviteGroupRequestPacket)Pack;
9423
9424 #region Packet Session and User Check
9425 if (m_checkPackets)
9426 {
9427 if (inviteGroupRequest.AgentData.SessionID != SessionId ||
9428 inviteGroupRequest.AgentData.AgentID != AgentId)
9429 return true;
9430 }
9431 #endregion
9432
9433 if (m_GroupsModule != null)
9434 {
9435 foreach (InviteGroupRequestPacket.InviteDataBlock b in
9436 inviteGroupRequest.InviteData)
9437 {
9438 m_GroupsModule.InviteGroupRequest(this,
9439 inviteGroupRequest.GroupData.GroupID,
9440 b.InviteeID,
9441 b.RoleID);
9442 }
9443 }
9444 return true;
9445 }
9446
9447 #endregion Groups
9448
9449 private bool HandleStartLure(IClientAPI sender, Packet Pack)
9450 {
9451 StartLurePacket startLureRequest = (StartLurePacket)Pack;
9452
9453 #region Packet Session and User Check
9454 if (m_checkPackets)
9455 {
9456 if (startLureRequest.AgentData.SessionID != SessionId ||
9457 startLureRequest.AgentData.AgentID != AgentId)
9458 return true;
9459 }
9460 #endregion
9461
9462 StartLure handlerStartLure = OnStartLure;
9463 if (handlerStartLure != null)
9464 handlerStartLure(startLureRequest.Info.LureType,
9465 Utils.BytesToString(
9466 startLureRequest.Info.Message),
9467 startLureRequest.TargetData[0].TargetID,
9468 this);
9469 return true;
9470 }
9471 private bool HandleTeleportLureRequest(IClientAPI sender, Packet Pack)
9472 {
9473 TeleportLureRequestPacket teleportLureRequest =
9474 (TeleportLureRequestPacket)Pack;
9475
9476 #region Packet Session and User Check
9477 if (m_checkPackets)
9478 {
9479 if (teleportLureRequest.Info.SessionID != SessionId ||
9480 teleportLureRequest.Info.AgentID != AgentId)
9481 return true;
9482 }
9483 #endregion
9484
9485 TeleportLureRequest handlerTeleportLureRequest = OnTeleportLureRequest;
9486 if (handlerTeleportLureRequest != null)
9487 handlerTeleportLureRequest(
9488 teleportLureRequest.Info.LureID,
9489 teleportLureRequest.Info.TeleportFlags,
9490 this);
9491 return true;
9492 }
9493 private bool HandleClassifiedInfoRequest(IClientAPI sender, Packet Pack)
9494 {
9495 ClassifiedInfoRequestPacket classifiedInfoRequest =
9496 (ClassifiedInfoRequestPacket)Pack;
9497
9498 #region Packet Session and User Check
9499 if (m_checkPackets)
9500 {
9501 if (classifiedInfoRequest.AgentData.SessionID != SessionId ||
9502 classifiedInfoRequest.AgentData.AgentID != AgentId)
9503 return true;
9504 }
9505 #endregion
9506
9507 ClassifiedInfoRequest handlerClassifiedInfoRequest = OnClassifiedInfoRequest;
9508 if (handlerClassifiedInfoRequest != null)
9509 handlerClassifiedInfoRequest(
9510 classifiedInfoRequest.Data.ClassifiedID,
9511 this);
9512 return true;
9513 }
9514 private bool HandleClassifiedInfoUpdate(IClientAPI sender, Packet Pack)
9515 {
9516 ClassifiedInfoUpdatePacket classifiedInfoUpdate =
9517 (ClassifiedInfoUpdatePacket)Pack;
9518
9519 #region Packet Session and User Check
9520 if (m_checkPackets)
9521 {
9522 if (classifiedInfoUpdate.AgentData.SessionID != SessionId ||
9523 classifiedInfoUpdate.AgentData.AgentID != AgentId)
9524 return true;
9525 }
9526 #endregion
9527
9528 ClassifiedInfoUpdate handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate;
9529 if (handlerClassifiedInfoUpdate != null)
9530 handlerClassifiedInfoUpdate(
9531 classifiedInfoUpdate.Data.ClassifiedID,
9532 classifiedInfoUpdate.Data.Category,
9533 Utils.BytesToString(
9534 classifiedInfoUpdate.Data.Name),
9535 Utils.BytesToString(
9536 classifiedInfoUpdate.Data.Desc),
9537 classifiedInfoUpdate.Data.ParcelID,
9538 classifiedInfoUpdate.Data.ParentEstate,
9539 classifiedInfoUpdate.Data.SnapshotID,
9540 new Vector3(
9541 classifiedInfoUpdate.Data.PosGlobal),
9542 classifiedInfoUpdate.Data.ClassifiedFlags,
9543 classifiedInfoUpdate.Data.PriceForListing,
9544 this);
9545 return true;
9546 }
9547 private bool HandleClassifiedDelete(IClientAPI sender, Packet Pack)
9548 {
9549 ClassifiedDeletePacket classifiedDelete =
9550 (ClassifiedDeletePacket)Pack;
9551
9552 #region Packet Session and User Check
9553 if (m_checkPackets)
9554 {
9555 if (classifiedDelete.AgentData.SessionID != SessionId ||
9556 classifiedDelete.AgentData.AgentID != AgentId)
9557 return true;
9558 }
9559 #endregion
9560
9561 ClassifiedDelete handlerClassifiedDelete = OnClassifiedDelete;
9562 if (handlerClassifiedDelete != null)
9563 handlerClassifiedDelete(
9564 classifiedDelete.Data.ClassifiedID,
9565 this);
9566 return true;
9567 }
9568 private bool HandleClassifiedGodDelete(IClientAPI sender, Packet Pack)
9569 {
9570 ClassifiedGodDeletePacket classifiedGodDelete =
9571 (ClassifiedGodDeletePacket)Pack;
9572
9573 #region Packet Session and User Check
9574 if (m_checkPackets)
9575 {
9576 if (classifiedGodDelete.AgentData.SessionID != SessionId ||
9577 classifiedGodDelete.AgentData.AgentID != AgentId)
9578 return true;
9579 }
9580 #endregion
9581
9582 ClassifiedDelete handlerClassifiedGodDelete = OnClassifiedGodDelete;
9583 if (handlerClassifiedGodDelete != null)
9584 handlerClassifiedGodDelete(
9585 classifiedGodDelete.Data.ClassifiedID,
9586 this);
9587 return true;
9588 }
9589 private bool HandleEventGodDelete(IClientAPI sender, Packet Pack)
9590 {
9591 EventGodDeletePacket eventGodDelete =
9592 (EventGodDeletePacket)Pack;
9593
9594 #region Packet Session and User Check
9595 if (m_checkPackets)
9596 {
9597 if (eventGodDelete.AgentData.SessionID != SessionId ||
9598 eventGodDelete.AgentData.AgentID != AgentId)
9599 return true;
9600 }
9601 #endregion
9602
9603 EventGodDelete handlerEventGodDelete = OnEventGodDelete;
9604 if (handlerEventGodDelete != null)
9605 handlerEventGodDelete(
9606 eventGodDelete.EventData.EventID,
9607 eventGodDelete.QueryData.QueryID,
9608 Utils.BytesToString(
9609 eventGodDelete.QueryData.QueryText),
9610 eventGodDelete.QueryData.QueryFlags,
9611 eventGodDelete.QueryData.QueryStart,
9612 this);
9613 return true;
9614 }
9615 private bool HandleEventNotificationAddRequest(IClientAPI sender, Packet Pack)
9616 {
9617 EventNotificationAddRequestPacket eventNotificationAdd =
9618 (EventNotificationAddRequestPacket)Pack;
9619
9620 #region Packet Session and User Check
9621 if (m_checkPackets)
9622 {
9623 if (eventNotificationAdd.AgentData.SessionID != SessionId ||
9624 eventNotificationAdd.AgentData.AgentID != AgentId)
9625 return true;
9626 }
9627 #endregion
9628
9629 EventNotificationAddRequest handlerEventNotificationAddRequest = OnEventNotificationAddRequest;
9630 if (handlerEventNotificationAddRequest != null)
9631 handlerEventNotificationAddRequest(
9632 eventNotificationAdd.EventData.EventID, this);
9633 return true;
9634 }
9635 private bool HandleEventNotificationRemoveRequest(IClientAPI sender, Packet Pack)
9636 {
9637 EventNotificationRemoveRequestPacket eventNotificationRemove =
9638 (EventNotificationRemoveRequestPacket)Pack;
9639
9640 #region Packet Session and User Check
9641 if (m_checkPackets)
9642 {
9643 if (eventNotificationRemove.AgentData.SessionID != SessionId ||
9644 eventNotificationRemove.AgentData.AgentID != AgentId)
9645 return true;
9646 }
9647 #endregion
9648
9649 EventNotificationRemoveRequest handlerEventNotificationRemoveRequest = OnEventNotificationRemoveRequest;
9650 if (handlerEventNotificationRemoveRequest != null)
9651 handlerEventNotificationRemoveRequest(
9652 eventNotificationRemove.EventData.EventID, this);
9653 return true;
9654 }
9655 private bool HandleRetrieveInstantMessages(IClientAPI sender, Packet Pack)
9656 {
9657 RetrieveInstantMessagesPacket rimpInstantMessagePack = (RetrieveInstantMessagesPacket)Pack;
9658
9659 #region Packet Session and User Check
9660 if (m_checkPackets)
9661 {
9662 if (rimpInstantMessagePack.AgentData.SessionID != SessionId ||
9663 rimpInstantMessagePack.AgentData.AgentID != AgentId)
9664 return true;
9665 }
9666 #endregion
9667
9668 RetrieveInstantMessages handlerRetrieveInstantMessages = OnRetrieveInstantMessages;
9669 if (handlerRetrieveInstantMessages != null)
9670 handlerRetrieveInstantMessages(this);
9671 return true;
9672 }
9673 private bool HandlePickDelete(IClientAPI sender, Packet Pack)
9674 {
9675 PickDeletePacket pickDelete =
9676 (PickDeletePacket)Pack;
9677
9678 #region Packet Session and User Check
9679 if (m_checkPackets)
9680 {
9681 if (pickDelete.AgentData.SessionID != SessionId ||
9682 pickDelete.AgentData.AgentID != AgentId)
9683 return true;
9684 }
9685 #endregion
9686
9687 PickDelete handlerPickDelete = OnPickDelete;
9688 if (handlerPickDelete != null)
9689 handlerPickDelete(this, pickDelete.Data.PickID);
9690 return true;
9691 }
9692 private bool HandlePickGodDelete(IClientAPI sender, Packet Pack)
9693 {
9694 PickGodDeletePacket pickGodDelete =
9695 (PickGodDeletePacket)Pack;
9696
9697 #region Packet Session and User Check
9698 if (m_checkPackets)
9699 {
9700 if (pickGodDelete.AgentData.SessionID != SessionId ||
9701 pickGodDelete.AgentData.AgentID != AgentId)
9702 return true;
9703 }
9704 #endregion
9705
9706 PickGodDelete handlerPickGodDelete = OnPickGodDelete;
9707 if (handlerPickGodDelete != null)
9708 handlerPickGodDelete(this,
9709 pickGodDelete.AgentData.AgentID,
9710 pickGodDelete.Data.PickID,
9711 pickGodDelete.Data.QueryID);
9712 return true;
9713 }
9714 private bool HandlePickInfoUpdate(IClientAPI sender, Packet Pack)
9715 {
9716 PickInfoUpdatePacket pickInfoUpdate =
9717 (PickInfoUpdatePacket)Pack;
9718
9719 #region Packet Session and User Check
9720 if (m_checkPackets)
9721 {
9722 if (pickInfoUpdate.AgentData.SessionID != SessionId ||
9723 pickInfoUpdate.AgentData.AgentID != AgentId)
9724 return true;
9725 }
9726 #endregion
9727
9728 PickInfoUpdate handlerPickInfoUpdate = OnPickInfoUpdate;
9729 if (handlerPickInfoUpdate != null)
9730 handlerPickInfoUpdate(this,
9731 pickInfoUpdate.Data.PickID,
9732 pickInfoUpdate.Data.CreatorID,
9733 pickInfoUpdate.Data.TopPick,
9734 Utils.BytesToString(pickInfoUpdate.Data.Name),
9735 Utils.BytesToString(pickInfoUpdate.Data.Desc),
9736 pickInfoUpdate.Data.SnapshotID,
9737 pickInfoUpdate.Data.SortOrder,
9738 pickInfoUpdate.Data.Enabled);
9739 return true;
9740 }
9741 private bool HandleAvatarNotesUpdate(IClientAPI sender, Packet Pack)
9742 {
9743 AvatarNotesUpdatePacket avatarNotesUpdate =
9744 (AvatarNotesUpdatePacket)Pack;
9745
9746 #region Packet Session and User Check
9747 if (m_checkPackets)
9748 {
9749 if (avatarNotesUpdate.AgentData.SessionID != SessionId ||
9750 avatarNotesUpdate.AgentData.AgentID != AgentId)
9751 return true;
9752 }
9753 #endregion
9754
9755 AvatarNotesUpdate handlerAvatarNotesUpdate = OnAvatarNotesUpdate;
9756 if (handlerAvatarNotesUpdate != null)
9757 handlerAvatarNotesUpdate(this,
9758 avatarNotesUpdate.Data.TargetID,
9759 Utils.BytesToString(avatarNotesUpdate.Data.Notes));
9760 return true;
9761 }
9762 private bool HandleAvatarInterestsUpdate(IClientAPI sender, Packet Pack)
9763 {
9764 AvatarInterestsUpdatePacket avatarInterestUpdate =
9765 (AvatarInterestsUpdatePacket)Pack;
9766
9767 #region Packet Session and User Check
9768 if (m_checkPackets)
9769 {
9770 if (avatarInterestUpdate.AgentData.SessionID != SessionId ||
9771 avatarInterestUpdate.AgentData.AgentID != AgentId)
9772 return true;
9773 }
9774 #endregion
9775
9776 AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate;
9777 if (handlerAvatarInterestUpdate != null)
9778 handlerAvatarInterestUpdate(this,
9779 avatarInterestUpdate.PropertiesData.WantToMask,
9780 Utils.BytesToString(avatarInterestUpdate.PropertiesData.WantToText),
9781 avatarInterestUpdate.PropertiesData.SkillsMask,
9782 Utils.BytesToString(avatarInterestUpdate.PropertiesData.SkillsText),
9783 Utils.BytesToString(avatarInterestUpdate.PropertiesData.LanguagesText));
9784 return true;
9785 }
9786 private bool HandleGrantUserRights(IClientAPI sender, Packet Pack)
9787 {
9788 GrantUserRightsPacket GrantUserRights =
9789 (GrantUserRightsPacket)Pack;
9790 #region Packet Session and User Check
9791 if (m_checkPackets)
9792 {
9793 if (GrantUserRights.AgentData.SessionID != SessionId ||
9794 GrantUserRights.AgentData.AgentID != AgentId)
9795 return true;
9796 }
9797 #endregion
9798 GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights;
9799 if (GrantUserRightsHandler != null)
9800 GrantUserRightsHandler(this,
9801 GrantUserRights.AgentData.AgentID,
9802 GrantUserRights.Rights[0].AgentRelated,
9803 GrantUserRights.Rights[0].RelatedRights);
9804 return true;
9805 }
9806 private bool HandlePlacesQuery(IClientAPI sender, Packet Pack)
9807 {
9808 PlacesQueryPacket placesQueryPacket =
9809 (PlacesQueryPacket)Pack;
9810
9811 PlacesQuery handlerPlacesQuery = OnPlacesQuery;
9812
9813 if (handlerPlacesQuery != null)
9814 handlerPlacesQuery(placesQueryPacket.AgentData.QueryID,
9815 placesQueryPacket.TransactionData.TransactionID,
9816 Utils.BytesToString(
9817 placesQueryPacket.QueryData.QueryText),
9818 placesQueryPacket.QueryData.QueryFlags,
9819 (byte)placesQueryPacket.QueryData.Category,
9820 Utils.BytesToString(
9821 placesQueryPacket.QueryData.SimName),
9822 this);
9823 return true;
9824 }
5246 9825
5247 #endregion Packet Handlers 9826 #endregion Packet Handlers
5248 9827
@@ -5732,15 +10311,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5732 10311
5733 if (ProcessPacketMethod(Pack)) 10312 if (ProcessPacketMethod(Pack))
5734 { 10313 {
10314 PacketPool.Instance.ReturnPacket(Pack);
5735 return; 10315 return;
5736 } 10316 }
5737 10317
5738 // Main packet processing conditional 10318 // Main packet processing conditional
5739 switch (Pack.Type) 10319 switch (Pack.Type)
5740 { 10320 {
5741 #region Scene/Avatar
5742 #region CommentedOut 10321 #region CommentedOut
5743 /* 10322 /*
10323 #region Scene/Avatar
10324
10325
5744 case PacketType.AvatarPropertiesRequest: 10326 case PacketType.AvatarPropertiesRequest:
5745 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; 10327 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
5746 10328
@@ -6402,8 +10984,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6402 10984
6403 } 10985 }
6404 break; 10986 break;
6405 */ 10987
6406 #endregion
6407 case PacketType.AvatarPickerRequest: 10988 case PacketType.AvatarPickerRequest:
6408 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; 10989 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
6409 10990
@@ -6427,7 +11008,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6427 Utils.BytesToString(querydata.Name)); 11008 Utils.BytesToString(querydata.Name));
6428 } 11009 }
6429 break; 11010 break;
6430 11011
6431 case PacketType.AgentDataUpdateRequest: 11012 case PacketType.AgentDataUpdateRequest:
6432 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; 11013 AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack;
6433 11014
@@ -6547,7 +11128,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6547 11128
6548 #endregion 11129 #endregion
6549 11130
6550 #region Objects/m_sceneObjects 11131
11132 //#region Objects/m_sceneObjects
6551 11133
6552 case PacketType.ObjectLink: 11134 case PacketType.ObjectLink:
6553 ObjectLinkPacket link = (ObjectLinkPacket)Pack; 11135 ObjectLinkPacket link = (ObjectLinkPacket)Pack;
@@ -6706,6 +11288,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6706 } 11288 }
6707 } 11289 }
6708 break; 11290 break;
11291
6709 case PacketType.ObjectDuplicate: 11292 case PacketType.ObjectDuplicate:
6710 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; 11293 ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack;
6711 11294
@@ -6758,6 +11341,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6758 } 11341 }
6759 } 11342 }
6760 break; 11343 break;
11344
6761 case PacketType.ObjectSelect: 11345 case PacketType.ObjectSelect:
6762 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; 11346 ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack;
6763 11347
@@ -6781,6 +11365,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6781 } 11365 }
6782 } 11366 }
6783 break; 11367 break;
11368
6784 case PacketType.ObjectDeselect: 11369 case PacketType.ObjectDeselect:
6785 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; 11370 ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack;
6786 11371
@@ -6804,6 +11389,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6804 } 11389 }
6805 } 11390 }
6806 break; 11391 break;
11392
6807 case PacketType.ObjectPosition: 11393 case PacketType.ObjectPosition:
6808 // DEPRECATED: but till libsecondlife removes it, people will use it 11394 // DEPRECATED: but till libsecondlife removes it, people will use it
6809 ObjectPositionPacket position = (ObjectPositionPacket)Pack; 11395 ObjectPositionPacket position = (ObjectPositionPacket)Pack;
@@ -6826,6 +11412,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6826 } 11412 }
6827 11413
6828 break; 11414 break;
11415
6829 case PacketType.ObjectScale: 11416 case PacketType.ObjectScale:
6830 // DEPRECATED: but till libsecondlife removes it, people will use it 11417 // DEPRECATED: but till libsecondlife removes it, people will use it
6831 ObjectScalePacket scale = (ObjectScalePacket)Pack; 11418 ObjectScalePacket scale = (ObjectScalePacket)Pack;
@@ -6847,6 +11434,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6847 } 11434 }
6848 11435
6849 break; 11436 break;
11437
6850 case PacketType.ObjectRotation: 11438 case PacketType.ObjectRotation:
6851 // DEPRECATED: but till libsecondlife removes it, people will use it 11439 // DEPRECATED: but till libsecondlife removes it, people will use it
6852 ObjectRotationPacket rotation = (ObjectRotationPacket)Pack; 11440 ObjectRotationPacket rotation = (ObjectRotationPacket)Pack;
@@ -6868,6 +11456,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6868 } 11456 }
6869 11457
6870 break; 11458 break;
11459
6871 case PacketType.ObjectFlagUpdate: 11460 case PacketType.ObjectFlagUpdate:
6872 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; 11461 ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack;
6873 11462
@@ -6908,6 +11497,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6908 } 11497 }
6909 } 11498 }
6910 break; 11499 break;
11500
6911 case PacketType.ObjectGrab: 11501 case PacketType.ObjectGrab:
6912 ObjectGrabPacket grab = (ObjectGrabPacket)Pack; 11502 ObjectGrabPacket grab = (ObjectGrabPacket)Pack;
6913 11503
@@ -6942,6 +11532,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6942 handlerGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this, touchArgs); 11532 handlerGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this, touchArgs);
6943 } 11533 }
6944 break; 11534 break;
11535
6945 case PacketType.ObjectGrabUpdate: 11536 case PacketType.ObjectGrabUpdate:
6946 ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; 11537 ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack;
6947 11538
@@ -6977,6 +11568,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6977 grabUpdate.ObjectData.GrabPosition, this, touchArgs); 11568 grabUpdate.ObjectData.GrabPosition, this, touchArgs);
6978 } 11569 }
6979 break; 11570 break;
11571
6980 case PacketType.ObjectDeGrab: 11572 case PacketType.ObjectDeGrab:
6981 ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; 11573 ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack;
6982 11574
@@ -7010,6 +11602,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7010 handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs); 11602 handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs);
7011 } 11603 }
7012 break; 11604 break;
11605
7013 case PacketType.ObjectSpinStart: 11606 case PacketType.ObjectSpinStart:
7014 //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet"); 11607 //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet");
7015 ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; 11608 ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack;
@@ -7053,6 +11646,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7053 handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this); 11646 handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this);
7054 } 11647 }
7055 break; 11648 break;
11649
11650
7056 case PacketType.ObjectSpinStop: 11651 case PacketType.ObjectSpinStop:
7057 //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); 11652 //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet");
7058 ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; 11653 ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack;
@@ -7097,6 +11692,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7097 } 11692 }
7098 } 11693 }
7099 break; 11694 break;
11695
7100 case PacketType.ObjectName: 11696 case PacketType.ObjectName:
7101 ObjectNamePacket objName = (ObjectNamePacket)Pack; 11697 ObjectNamePacket objName = (ObjectNamePacket)Pack;
7102 11698
@@ -7120,6 +11716,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7120 } 11716 }
7121 } 11717 }
7122 break; 11718 break;
11719
7123 case PacketType.ObjectPermissions: 11720 case PacketType.ObjectPermissions:
7124 if (OnObjectPermissions != null) 11721 if (OnObjectPermissions != null)
7125 { 11722 {
@@ -7195,6 +11792,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7195 } 11792 }
7196 } 11793 }
7197 break; 11794 break;
11795
7198 case PacketType.ObjectDuplicateOnRay: 11796 case PacketType.ObjectDuplicateOnRay:
7199 ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack; 11797 ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack;
7200 11798
@@ -7222,6 +11820,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7222 } 11820 }
7223 11821
7224 break; 11822 break;
11823
7225 case PacketType.RequestObjectPropertiesFamily: 11824 case PacketType.RequestObjectPropertiesFamily:
7226 //This powers the little tooltip that appears when you move your mouse over an object 11825 //This powers the little tooltip that appears when you move your mouse over an object
7227 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; 11826 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
@@ -7246,6 +11845,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7246 } 11845 }
7247 11846
7248 break; 11847 break;
11848
7249 case PacketType.ObjectIncludeInSearch: 11849 case PacketType.ObjectIncludeInSearch:
7250 //This lets us set objects to appear in search (stuff like DataSnapshot, etc) 11850 //This lets us set objects to appear in search (stuff like DataSnapshot, etc)
7251 ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack; 11851 ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack;
@@ -7341,9 +11941,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7341 } 11941 }
7342 break; 11942 break;
7343 11943
7344 #endregion 11944 //#endregion
7345 11945
7346 #region Inventory/Asset/Other related packets 11946 //#region Inventory/Asset/Other related packets
7347 11947
7348 case PacketType.RequestImage: 11948 case PacketType.RequestImage:
7349 RequestImagePacket imageRequest = (RequestImagePacket)Pack; 11949 RequestImagePacket imageRequest = (RequestImagePacket)Pack;
@@ -7477,12 +12077,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7477 12077
7478 MakeAssetRequest(transfer, taskID); 12078 MakeAssetRequest(transfer, taskID);
7479 12079
7480 /* RequestAsset = OnRequestAsset; 12080 // RequestAsset = OnRequestAsset;
7481 if (RequestAsset != null) 12081 // if (RequestAsset != null)
7482 { 12082 // {
7483 RequestAsset(this, transfer); 12083 // RequestAsset(this, transfer);
7484 }*/ 12084 // }
12085
7485 break; 12086 break;
12087
7486 case PacketType.AssetUploadRequest: 12088 case PacketType.AssetUploadRequest:
7487 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; 12089 AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack;
7488 12090
@@ -7501,6 +12103,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7501 request.AssetBlock.Tempfile); 12103 request.AssetBlock.Tempfile);
7502 } 12104 }
7503 break; 12105 break;
12106
7504 case PacketType.RequestXfer: 12107 case PacketType.RequestXfer:
7505 RequestXferPacket xferReq = (RequestXferPacket)Pack; 12108 RequestXferPacket xferReq = (RequestXferPacket)Pack;
7506 12109
@@ -7511,6 +12114,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7511 handlerRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename)); 12114 handlerRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename));
7512 } 12115 }
7513 break; 12116 break;
12117
7514 case PacketType.SendXferPacket: 12118 case PacketType.SendXferPacket:
7515 SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack; 12119 SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack;
7516 12120
@@ -7520,6 +12124,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7520 handlerXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data); 12124 handlerXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data);
7521 } 12125 }
7522 break; 12126 break;
12127
7523 case PacketType.ConfirmXferPacket: 12128 case PacketType.ConfirmXferPacket:
7524 ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack; 12129 ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack;
7525 12130
@@ -7529,6 +12134,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7529 handlerConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); 12134 handlerConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet);
7530 } 12135 }
7531 break; 12136 break;
12137
7532 case PacketType.AbortXfer: 12138 case PacketType.AbortXfer:
7533 AbortXferPacket abortXfer = (AbortXferPacket)Pack; 12139 AbortXferPacket abortXfer = (AbortXferPacket)Pack;
7534 AbortXfer handlerAbortXfer = OnAbortXfer; 12140 AbortXfer handlerAbortXfer = OnAbortXfer;
@@ -7538,6 +12144,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7538 } 12144 }
7539 12145
7540 break; 12146 break;
12147
7541 case PacketType.CreateInventoryFolder: 12148 case PacketType.CreateInventoryFolder:
7542 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; 12149 CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
7543 12150
@@ -7559,6 +12166,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7559 invFolder.FolderData.ParentID); 12166 invFolder.FolderData.ParentID);
7560 } 12167 }
7561 break; 12168 break;
12169
7562 case PacketType.UpdateInventoryFolder: 12170 case PacketType.UpdateInventoryFolder:
7563 if (OnUpdateInventoryFolder != null) 12171 if (OnUpdateInventoryFolder != null)
7564 { 12172 {
@@ -7588,6 +12196,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7588 } 12196 }
7589 } 12197 }
7590 break; 12198 break;
12199
7591 case PacketType.MoveInventoryFolder: 12200 case PacketType.MoveInventoryFolder:
7592 if (OnMoveInventoryFolder != null) 12201 if (OnMoveInventoryFolder != null)
7593 { 12202 {
@@ -7615,6 +12224,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7615 } 12224 }
7616 } 12225 }
7617 break; 12226 break;
12227
7618 case PacketType.CreateInventoryItem: 12228 case PacketType.CreateInventoryItem:
7619 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; 12229 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
7620 12230
@@ -7642,6 +12252,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7642 Util.UnixTimeSinceEpoch()); 12252 Util.UnixTimeSinceEpoch());
7643 } 12253 }
7644 break; 12254 break;
12255
7645 case PacketType.FetchInventory: 12256 case PacketType.FetchInventory:
7646 if (OnFetchInventory != null) 12257 if (OnFetchInventory != null)
7647 { 12258 {
@@ -7670,6 +12281,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7670 } 12281 }
7671 } 12282 }
7672 break; 12283 break;
12284
7673 case PacketType.FetchInventoryDescendents: 12285 case PacketType.FetchInventoryDescendents:
7674 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; 12286 FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack;
7675 12287
@@ -7690,6 +12302,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7690 Fetch.InventoryData.SortOrder); 12302 Fetch.InventoryData.SortOrder);
7691 } 12303 }
7692 break; 12304 break;
12305
7693 case PacketType.PurgeInventoryDescendents: 12306 case PacketType.PurgeInventoryDescendents:
7694 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; 12307 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack;
7695 12308
@@ -7708,6 +12321,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7708 handlerPurgeInventoryDescendents(this, Purge.InventoryData.FolderID); 12321 handlerPurgeInventoryDescendents(this, Purge.InventoryData.FolderID);
7709 } 12322 }
7710 break; 12323 break;
12324
7711 case PacketType.UpdateInventoryItem: 12325 case PacketType.UpdateInventoryItem:
7712 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack; 12326 UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack;
7713 12327
@@ -7752,6 +12366,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7752 } 12366 }
7753 } 12367 }
7754 break; 12368 break;
12369
7755 case PacketType.CopyInventoryItem: 12370 case PacketType.CopyInventoryItem:
7756 CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack; 12371 CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack;
7757 12372
@@ -7779,6 +12394,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7779 } 12394 }
7780 } 12395 }
7781 break; 12396 break;
12397
7782 case PacketType.MoveInventoryItem: 12398 case PacketType.MoveInventoryItem:
7783 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; 12399 MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack;
7784 12400
@@ -7812,6 +12428,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7812 } 12428 }
7813 } 12429 }
7814 break; 12430 break;
12431
7815 case PacketType.RemoveInventoryItem: 12432 case PacketType.RemoveInventoryItem:
7816 RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack; 12433 RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack;
7817 12434
@@ -7840,6 +12457,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7840 12457
7841 } 12458 }
7842 break; 12459 break;
12460
7843 case PacketType.RemoveInventoryFolder: 12461 case PacketType.RemoveInventoryFolder:
7844 RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack; 12462 RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack;
7845 12463
@@ -7867,6 +12485,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7867 } 12485 }
7868 } 12486 }
7869 break; 12487 break;
12488
7870 case PacketType.RemoveInventoryObjects: 12489 case PacketType.RemoveInventoryObjects:
7871 RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack; 12490 RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack;
7872 #region Packet Session and User Check 12491 #region Packet Session and User Check
@@ -7907,6 +12526,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7907 } 12526 }
7908 } 12527 }
7909 break; 12528 break;
12529
7910 case PacketType.RequestTaskInventory: 12530 case PacketType.RequestTaskInventory:
7911 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; 12531 RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack;
7912 12532
@@ -7925,6 +12545,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7925 handlerRequestTaskInventory(this, requesttask.InventoryData.LocalID); 12545 handlerRequestTaskInventory(this, requesttask.InventoryData.LocalID);
7926 } 12546 }
7927 break; 12547 break;
12548
7928 case PacketType.UpdateTaskInventory: 12549 case PacketType.UpdateTaskInventory:
7929 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; 12550 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
7930 12551
@@ -8102,6 +12723,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8102 handlerMapNameRequest(this, mapName); 12723 handlerMapNameRequest(this, mapName);
8103 } 12724 }
8104 break; 12725 break;
12726
8105 case PacketType.TeleportLandmarkRequest: 12727 case PacketType.TeleportLandmarkRequest:
8106 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; 12728 TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack;
8107 12729
@@ -8172,7 +12794,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8172 12794
8173 } 12795 }
8174 break; 12796 break;
8175 12797
8176 case PacketType.TeleportLocationRequest: 12798 case PacketType.TeleportLocationRequest:
8177 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; 12799 TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack;
8178 // m_log.Debug(tpLocReq.ToString()); 12800 // m_log.Debug(tpLocReq.ToString());
@@ -8202,7 +12824,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8202 } 12824 }
8203 break; 12825 break;
8204 12826
8205 #endregion 12827 //#endregion
8206 12828
8207 case PacketType.UUIDNameRequest: 12829 case PacketType.UUIDNameRequest:
8208 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; 12830 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
@@ -8217,7 +12839,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8217 } 12839 }
8218 break; 12840 break;
8219 12841
8220 #region Parcel related packets 12842 //#region Parcel related packets
12843
8221 12844
8222 case PacketType.RegionHandleRequest: 12845 case PacketType.RegionHandleRequest:
8223 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; 12846 RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack;
@@ -8300,6 +12923,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8300 updatePacket.Data.LocalID, entries, this); 12923 updatePacket.Data.LocalID, entries, this);
8301 } 12924 }
8302 break; 12925 break;
12926
8303 case PacketType.ParcelPropertiesRequest: 12927 case PacketType.ParcelPropertiesRequest:
8304 12928
8305 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; 12929 ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack;
@@ -8324,6 +12948,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8324 propertiesRequest.ParcelData.SnapSelection, this); 12948 propertiesRequest.ParcelData.SnapSelection, this);
8325 } 12949 }
8326 break; 12950 break;
12951
8327 case PacketType.ParcelDivide: 12952 case PacketType.ParcelDivide:
8328 ParcelDividePacket landDivide = (ParcelDividePacket)Pack; 12953 ParcelDividePacket landDivide = (ParcelDividePacket)Pack;
8329 12954
@@ -8345,6 +12970,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8345 (int)Math.Round(landDivide.ParcelData.North), this); 12970 (int)Math.Round(landDivide.ParcelData.North), this);
8346 } 12971 }
8347 break; 12972 break;
12973
8348 case PacketType.ParcelJoin: 12974 case PacketType.ParcelJoin:
8349 ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; 12975 ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack;
8350 12976
@@ -8367,6 +12993,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8367 (int)Math.Round(landJoin.ParcelData.North), this); 12993 (int)Math.Round(landJoin.ParcelData.North), this);
8368 } 12994 }
8369 break; 12995 break;
12996
8370 case PacketType.ParcelPropertiesUpdate: 12997 case PacketType.ParcelPropertiesUpdate:
8371 ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack; 12998 ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack;
8372 12999
@@ -8405,6 +13032,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8405 handlerParcelPropertiesUpdateRequest(args, parcelPropertiesPacket.ParcelData.LocalID, this); 13032 handlerParcelPropertiesUpdateRequest(args, parcelPropertiesPacket.ParcelData.LocalID, this);
8406 } 13033 }
8407 break; 13034 break;
13035
8408 case PacketType.ParcelSelectObjects: 13036 case PacketType.ParcelSelectObjects:
8409 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; 13037 ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack;
8410 13038
@@ -8433,6 +13061,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8433 Convert.ToInt32(selectPacket.ParcelData.ReturnType), returnIDs, this); 13061 Convert.ToInt32(selectPacket.ParcelData.ReturnType), returnIDs, this);
8434 } 13062 }
8435 break; 13063 break;
13064
8436 case PacketType.ParcelObjectOwnersRequest: 13065 case PacketType.ParcelObjectOwnersRequest:
8437 //m_log.Debug(Pack.ToString()); 13066 //m_log.Debug(Pack.ToString());
8438 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; 13067 ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack;
@@ -8453,6 +13082,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8453 handlerParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this); 13082 handlerParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this);
8454 } 13083 }
8455 break; 13084 break;
13085
8456 case PacketType.ParcelGodForceOwner: 13086 case PacketType.ParcelGodForceOwner:
8457 ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack; 13087 ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack;
8458 13088
@@ -8471,6 +13101,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8471 handlerParcelGodForceOwner(godForceOwnerPacket.Data.LocalID, godForceOwnerPacket.Data.OwnerID, this); 13101 handlerParcelGodForceOwner(godForceOwnerPacket.Data.LocalID, godForceOwnerPacket.Data.OwnerID, this);
8472 } 13102 }
8473 break; 13103 break;
13104
8474 case PacketType.ParcelRelease: 13105 case PacketType.ParcelRelease:
8475 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; 13106 ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack;
8476 13107
@@ -8489,6 +13120,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8489 handlerParcelAbandonRequest(releasePacket.Data.LocalID, this); 13120 handlerParcelAbandonRequest(releasePacket.Data.LocalID, this);
8490 } 13121 }
8491 break; 13122 break;
13123
8492 case PacketType.ParcelReclaim: 13124 case PacketType.ParcelReclaim:
8493 ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack; 13125 ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack;
8494 13126
@@ -8507,6 +13139,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8507 handlerParcelReclaim(reclaimPacket.Data.LocalID, this); 13139 handlerParcelReclaim(reclaimPacket.Data.LocalID, this);
8508 } 13140 }
8509 break; 13141 break;
13142
8510 case PacketType.ParcelReturnObjects: 13143 case PacketType.ParcelReturnObjects:
8511 13144
8512 13145
@@ -8598,9 +13231,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8598 } 13231 }
8599 break; 13232 break;
8600 13233
8601 #endregion 13234 //#endregion
8602 13235
8603 #region Estate Packets 13236 //#region Estate Packets
8604 13237
8605 case PacketType.EstateOwnerMessage: 13238 case PacketType.EstateOwnerMessage:
8606 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; 13239 EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack;
@@ -8918,6 +13551,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8918 handlerRegionInfoRequest(this); 13551 handlerRegionInfoRequest(this);
8919 } 13552 }
8920 break; 13553 break;
13554
8921 case PacketType.EstateCovenantRequest: 13555 case PacketType.EstateCovenantRequest:
8922 13556
8923 //EstateCovenantRequestPacket.AgentDataBlock epack = 13557 //EstateCovenantRequestPacket.AgentDataBlock epack =
@@ -8930,9 +13564,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8930 } 13564 }
8931 break; 13565 break;
8932 13566
8933 #endregion 13567 //#endregion
8934 13568
8935 #region GodPackets 13569 //#region GodPackets
8936 13570
8937 case PacketType.RequestGodlikePowers: 13571 case PacketType.RequestGodlikePowers:
8938 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; 13572 RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack;
@@ -8949,6 +13583,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8949 } 13583 }
8950 13584
8951 break; 13585 break;
13586
8952 case PacketType.GodKickUser: 13587 case PacketType.GodKickUser:
8953 GodKickUserPacket gkupack = (GodKickUserPacket)Pack; 13588 GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
8954 13589
@@ -8978,9 +13613,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
8978 //OutPacket(kupack, ThrottleOutPacketType.Task); 13613 //OutPacket(kupack, ThrottleOutPacketType.Task);
8979 break; 13614 break;
8980 13615
8981 #endregion 13616 //#endregion
8982 13617
8983 #region Economy/Transaction Packets 13618 //#region Economy/Transaction Packets
8984 13619
8985 case PacketType.MoneyBalanceRequest: 13620 case PacketType.MoneyBalanceRequest:
8986 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; 13621 MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack;
@@ -9002,6 +13637,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9002 } 13637 }
9003 13638
9004 break; 13639 break;
13640
9005 case PacketType.EconomyDataRequest: 13641 case PacketType.EconomyDataRequest:
9006 13642
9007 13643
@@ -9011,6 +13647,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9011 handlerEconomoyDataRequest(AgentId); 13647 handlerEconomoyDataRequest(AgentId);
9012 } 13648 }
9013 break; 13649 break;
13650
9014 case PacketType.RequestPayPrice: 13651 case PacketType.RequestPayPrice:
9015 RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack; 13652 RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack;
9016 13653
@@ -9080,9 +13717,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9080 } 13717 }
9081 break; 13718 break;
9082 13719
9083 #endregion 13720 //#endregion
9084 13721
9085 #region Script Packets 13722 //#region Script Packets
9086 13723
9087 case PacketType.GetScriptRunning: 13724 case PacketType.GetScriptRunning:
9088 GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack; 13725 GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack;
@@ -9132,9 +13769,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9132 } 13769 }
9133 break; 13770 break;
9134 13771
9135 #endregion 13772 //#endregion
9136 13773
9137 #region Gesture Managment 13774 //#region Gesture Managment
9138 13775
9139 case PacketType.ActivateGestures: 13776 case PacketType.ActivateGestures:
9140 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack; 13777 ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack;
@@ -9201,7 +13838,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9201 } 13838 }
9202 break; 13839 break;
9203 13840
9204 #endregion 13841 //#endregion
9205 13842
9206 case PacketType.AgentFOV: 13843 case PacketType.AgentFOV:
9207 AgentFOVPacket fovPacket = (AgentFOVPacket)Pack; 13844 AgentFOVPacket fovPacket = (AgentFOVPacket)Pack;
@@ -9217,7 +13854,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9217 } 13854 }
9218 break; 13855 break;
9219 13856
9220 #region unimplemented handlers 13857 //#region unimplemented handlers
9221 13858
9222 case PacketType.ViewerStats: 13859 case PacketType.ViewerStats:
9223 // TODO: handle this packet 13860 // TODO: handle this packet
@@ -9251,6 +13888,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9251 // TODO: handle this packet 13888 // TODO: handle this packet
9252 //m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); 13889 //m_log.Warn("[CLIENT]: unhandled TransferAbort packet");
9253 break; 13890 break;
13891
9254 case PacketType.MuteListRequest: 13892 case PacketType.MuteListRequest:
9255 MuteListRequestPacket muteListRequest = 13893 MuteListRequestPacket muteListRequest =
9256 (MuteListRequestPacket)Pack; 13894 (MuteListRequestPacket)Pack;
@@ -9274,6 +13912,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9274 SendUseCachedMuteList(); 13912 SendUseCachedMuteList();
9275 } 13913 }
9276 break; 13914 break;
13915
9277 case PacketType.UseCircuitCode: 13916 case PacketType.UseCircuitCode:
9278 // Don't display this one, we handle it at a lower level 13917 // Don't display this one, we handle it at a lower level
9279 break; 13918 break;
@@ -9288,6 +13927,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9288 //m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); 13927 //m_log.Warn("[CLIENT]: unhandled InventoryDescent packet");
9289 13928
9290 break; 13929 break;
13930
9291 case PacketType.DirPlacesQuery: 13931 case PacketType.DirPlacesQuery:
9292 DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack; 13932 DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack;
9293 //m_log.Debug(dirPlacesQueryPacket.ToString()); 13933 //m_log.Debug(dirPlacesQueryPacket.ToString());
@@ -9315,6 +13955,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9315 dirPlacesQueryPacket.QueryData.QueryStart); 13955 dirPlacesQueryPacket.QueryData.QueryStart);
9316 } 13956 }
9317 break; 13957 break;
13958
9318 case PacketType.DirFindQuery: 13959 case PacketType.DirFindQuery:
9319 DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack; 13960 DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack;
9320 13961
@@ -9338,6 +13979,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9338 dirFindQueryPacket.QueryData.QueryStart); 13979 dirFindQueryPacket.QueryData.QueryStart);
9339 } 13980 }
9340 break; 13981 break;
13982
9341 case PacketType.DirLandQuery: 13983 case PacketType.DirLandQuery:
9342 DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack; 13984 DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack;
9343 13985
@@ -9362,6 +14004,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9362 dirLandQueryPacket.QueryData.QueryStart); 14004 dirLandQueryPacket.QueryData.QueryStart);
9363 } 14005 }
9364 break; 14006 break;
14007
9365 case PacketType.DirPopularQuery: 14008 case PacketType.DirPopularQuery:
9366 DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack; 14009 DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack;
9367 14010
@@ -9382,6 +14025,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9382 dirPopularQueryPacket.QueryData.QueryFlags); 14025 dirPopularQueryPacket.QueryData.QueryFlags);
9383 } 14026 }
9384 break; 14027 break;
14028
9385 case PacketType.DirClassifiedQuery: 14029 case PacketType.DirClassifiedQuery:
9386 DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack; 14030 DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack;
9387 14031
@@ -9406,6 +14050,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9406 dirClassifiedQueryPacket.QueryData.QueryStart); 14050 dirClassifiedQueryPacket.QueryData.QueryStart);
9407 } 14051 }
9408 break; 14052 break;
14053
9409 case PacketType.EventInfoRequest: 14054 case PacketType.EventInfoRequest:
9410 EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack; 14055 EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack;
9411 14056
@@ -9424,7 +14069,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9424 } 14069 }
9425 break; 14070 break;
9426 14071
9427 #region Calling Card 14072 //#region Calling Card
9428 14073
9429 case PacketType.OfferCallingCard: 14074 case PacketType.OfferCallingCard:
9430 OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack; 14075 OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack;
@@ -9486,9 +14131,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9486 declineCallingCardPacket.TransactionBlock.TransactionID); 14131 declineCallingCardPacket.TransactionBlock.TransactionID);
9487 } 14132 }
9488 break; 14133 break;
9489 #endregion 14134 //#endregion
9490 14135
9491 #region Groups 14136 //#region Groups
9492 case PacketType.ActivateGroup: 14137 case PacketType.ActivateGroup:
9493 ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack; 14138 ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack;
9494 14139
@@ -9508,6 +14153,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9508 } 14153 }
9509 break; 14154 break;
9510 14155
14156
9511 case PacketType.GroupTitlesRequest: 14157 case PacketType.GroupTitlesRequest:
9512 GroupTitlesRequestPacket groupTitlesRequest = 14158 GroupTitlesRequestPacket groupTitlesRequest =
9513 (GroupTitlesRequestPacket)Pack; 14159 (GroupTitlesRequestPacket)Pack;
@@ -9969,8 +14615,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9969 14615
9970 OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task); 14616 OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task);
9971 } 14617 }
9972 14618
9973 break; 14619 break;
14620
9974 case PacketType.GroupNoticeRequest: 14621 case PacketType.GroupNoticeRequest:
9975 GroupNoticeRequestPacket groupNoticeRequest = 14622 GroupNoticeRequestPacket groupNoticeRequest =
9976 (GroupNoticeRequestPacket)Pack; 14623 (GroupNoticeRequestPacket)Pack;
@@ -10141,7 +14788,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10141 } 14788 }
10142 break; 14789 break;
10143 14790
10144 #endregion 14791 //#endregion
14792
10145 case PacketType.StartLure: 14793 case PacketType.StartLure:
10146 StartLurePacket startLureRequest = (StartLurePacket)Pack; 14794 StartLurePacket startLureRequest = (StartLurePacket)Pack;
10147 14795
@@ -10373,6 +15021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10373 if (handlerPickDelete != null) 15021 if (handlerPickDelete != null)
10374 handlerPickDelete(this, pickDelete.Data.PickID); 15022 handlerPickDelete(this, pickDelete.Data.PickID);
10375 break; 15023 break;
15024
10376 case PacketType.PickGodDelete: 15025 case PacketType.PickGodDelete:
10377 PickGodDeletePacket pickGodDelete = 15026 PickGodDeletePacket pickGodDelete =
10378 (PickGodDeletePacket)Pack; 15027 (PickGodDeletePacket)Pack;
@@ -10393,6 +15042,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10393 pickGodDelete.Data.PickID, 15042 pickGodDelete.Data.PickID,
10394 pickGodDelete.Data.QueryID); 15043 pickGodDelete.Data.QueryID);
10395 break; 15044 break;
15045
10396 case PacketType.PickInfoUpdate: 15046 case PacketType.PickInfoUpdate:
10397 PickInfoUpdatePacket pickInfoUpdate = 15047 PickInfoUpdatePacket pickInfoUpdate =
10398 (PickInfoUpdatePacket)Pack; 15048 (PickInfoUpdatePacket)Pack;
@@ -10418,6 +15068,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10418 pickInfoUpdate.Data.SortOrder, 15068 pickInfoUpdate.Data.SortOrder,
10419 pickInfoUpdate.Data.Enabled); 15069 pickInfoUpdate.Data.Enabled);
10420 break; 15070 break;
15071
10421 case PacketType.AvatarNotesUpdate: 15072 case PacketType.AvatarNotesUpdate:
10422 AvatarNotesUpdatePacket avatarNotesUpdate = 15073 AvatarNotesUpdatePacket avatarNotesUpdate =
10423 (AvatarNotesUpdatePacket)Pack; 15074 (AvatarNotesUpdatePacket)Pack;
@@ -10450,7 +15101,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10450 break; 15101 break;
10451 } 15102 }
10452 #endregion 15103 #endregion
10453 15104
10454 AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate; 15105 AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate;
10455 if (handlerAvatarInterestUpdate != null) 15106 if (handlerAvatarInterestUpdate != null)
10456 handlerAvatarInterestUpdate(this, 15107 handlerAvatarInterestUpdate(this,
@@ -10497,11 +15148,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
10497 placesQueryPacket.QueryData.SimName), 15148 placesQueryPacket.QueryData.SimName),
10498 this); 15149 this);
10499 break; 15150 break;
15151 */
15152 #endregion
10500 default: 15153 default:
10501 m_log.Warn("[CLIENT]: unhandled packet " + Pack); 15154 m_log.Warn("[CLIENT]: unhandled packet " + Pack);
10502 break; 15155 break;
10503
10504 #endregion
10505 } 15156 }
10506 15157
10507 PacketPool.Instance.ReturnPacket(Pack); 15158 PacketPool.Instance.ReturnPacket(Pack);