diff options
author | Melanie | 2009-11-24 16:00:35 +0000 |
---|---|---|
committer | Melanie | 2009-11-24 16:00:35 +0000 |
commit | cad2bf5b088c17896cb0b63db39fe4ee638f293d (patch) | |
tree | 78f94685fa5a1340b93c42dca42cb5608e065a56 /OpenSim/Region/ClientStack/LindenUDP | |
parent | Revert "testing checkout" (diff) | |
parent | * This concludes the packet migrations from the big nasty switch into packet ... (diff) | |
download | opensim-SC-cad2bf5b088c17896cb0b63db39fe4ee638f293d.zip opensim-SC-cad2bf5b088c17896cb0b63db39fe4ee638f293d.tar.gz opensim-SC-cad2bf5b088c17896cb0b63db39fe4ee638f293d.tar.bz2 opensim-SC-cad2bf5b088c17896cb0b63db39fe4ee638f293d.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4729 |
1 files changed, 4689 insertions, 40 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 47251b7..a8206dc 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,4430 @@ 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 | private bool HandleRequestRegionInfo(IClientAPI sender, Packet Pack) | ||
8119 | { | ||
8120 | RequestRegionInfoPacket.AgentDataBlock mPacket = ((RequestRegionInfoPacket)Pack).AgentData; | ||
8121 | |||
8122 | #region Packet Session and User Check | ||
8123 | if (m_checkPackets) | ||
8124 | { | ||
8125 | if (mPacket.SessionID != SessionId || | ||
8126 | mPacket.AgentID != AgentId) | ||
8127 | return true; | ||
8128 | } | ||
8129 | #endregion | ||
8130 | |||
8131 | RegionInfoRequest handlerRegionInfoRequest = OnRegionInfoRequest; | ||
8132 | if (handlerRegionInfoRequest != null) | ||
8133 | { | ||
8134 | handlerRegionInfoRequest(this); | ||
8135 | } | ||
8136 | return true; | ||
8137 | } | ||
8138 | private bool HandleEstateCovenantRequest(IClientAPI sender, Packet Pack) | ||
8139 | { | ||
8140 | |||
8141 | //EstateCovenantRequestPacket.AgentDataBlock epack = | ||
8142 | // ((EstateCovenantRequestPacket)Pack).AgentData; | ||
8143 | |||
8144 | EstateCovenantRequest handlerEstateCovenantRequest = OnEstateCovenantRequest; | ||
8145 | if (handlerEstateCovenantRequest != null) | ||
8146 | { | ||
8147 | handlerEstateCovenantRequest(this); | ||
8148 | } | ||
8149 | return true; | ||
8150 | |||
8151 | } | ||
8152 | |||
8153 | #endregion Estate Packets | ||
8154 | |||
8155 | #region GodPackets | ||
8156 | |||
8157 | private bool HandleRequestGodlikePowers(IClientAPI sender, Packet Pack) | ||
8158 | { | ||
8159 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; | ||
8160 | RequestGodlikePowersPacket.RequestBlockBlock rblock = rglpPack.RequestBlock; | ||
8161 | UUID token = rblock.Token; | ||
8162 | |||
8163 | RequestGodlikePowersPacket.AgentDataBlock ablock = rglpPack.AgentData; | ||
8164 | |||
8165 | RequestGodlikePowers handlerReqGodlikePowers = OnRequestGodlikePowers; | ||
8166 | |||
8167 | if (handlerReqGodlikePowers != null) | ||
8168 | { | ||
8169 | handlerReqGodlikePowers(ablock.AgentID, ablock.SessionID, token, rblock.Godlike, this); | ||
8170 | } | ||
8171 | |||
8172 | return true; | ||
8173 | } | ||
8174 | private bool HandleGodKickUser(IClientAPI sender, Packet Pack) | ||
8175 | { | ||
8176 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | ||
8177 | |||
8178 | if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID) | ||
8179 | { | ||
8180 | GodKickUser handlerGodKickUser = OnGodKickUser; | ||
8181 | if (handlerGodKickUser != null) | ||
8182 | { | ||
8183 | handlerGodKickUser(gkupack.UserInfo.GodID, gkupack.UserInfo.GodSessionID, | ||
8184 | gkupack.UserInfo.AgentID, (uint)0, gkupack.UserInfo.Reason); | ||
8185 | } | ||
8186 | } | ||
8187 | else | ||
8188 | { | ||
8189 | SendAgentAlertMessage("Kick request denied", false); | ||
8190 | } | ||
8191 | //KickUserPacket kupack = new KickUserPacket(); | ||
8192 | //KickUserPacket.UserInfoBlock kupackib = kupack.UserInfo; | ||
8193 | |||
8194 | //kupack.UserInfo.AgentID = gkupack.UserInfo.AgentID; | ||
8195 | //kupack.UserInfo.SessionID = gkupack.UserInfo.GodSessionID; | ||
8196 | |||
8197 | //kupack.TargetBlock.TargetIP = (uint)0; | ||
8198 | //kupack.TargetBlock.TargetPort = (ushort)0; | ||
8199 | //kupack.UserInfo.Reason = gkupack.UserInfo.Reason; | ||
8200 | |||
8201 | //OutPacket(kupack, ThrottleOutPacketType.Task); | ||
8202 | return true; | ||
8203 | } | ||
8204 | #endregion GodPackets | ||
8205 | |||
8206 | #region Economy/Transaction Packets | ||
8207 | |||
8208 | private bool HandleMoneyBalanceRequest(IClientAPI sender, Packet Pack) | ||
8209 | { | ||
8210 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; | ||
8211 | |||
8212 | #region Packet Session and User Check | ||
8213 | if (m_checkPackets) | ||
8214 | { | ||
8215 | if (moneybalancerequestpacket.AgentData.SessionID != SessionId || | ||
8216 | moneybalancerequestpacket.AgentData.AgentID != AgentId) | ||
8217 | return true; | ||
8218 | } | ||
8219 | #endregion | ||
8220 | |||
8221 | MoneyBalanceRequest handlerMoneyBalanceRequest = OnMoneyBalanceRequest; | ||
8222 | |||
8223 | if (handlerMoneyBalanceRequest != null) | ||
8224 | { | ||
8225 | handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); | ||
8226 | } | ||
8227 | |||
8228 | return true; | ||
8229 | } | ||
8230 | private bool HandleEconomyDataRequest(IClientAPI sender, Packet Pack) | ||
8231 | { | ||
8232 | EconomyDataRequest handlerEconomoyDataRequest = OnEconomyDataRequest; | ||
8233 | if (handlerEconomoyDataRequest != null) | ||
8234 | { | ||
8235 | handlerEconomoyDataRequest(AgentId); | ||
8236 | } | ||
8237 | return true; | ||
8238 | } | ||
8239 | private bool HandleRequestPayPrice(IClientAPI sender, Packet Pack) | ||
8240 | { | ||
8241 | RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack; | ||
8242 | |||
8243 | RequestPayPrice handlerRequestPayPrice = OnRequestPayPrice; | ||
8244 | if (handlerRequestPayPrice != null) | ||
8245 | { | ||
8246 | handlerRequestPayPrice(this, requestPayPricePacket.ObjectData.ObjectID); | ||
8247 | } | ||
8248 | return true; | ||
8249 | } | ||
8250 | private bool HandleObjectSaleInfo(IClientAPI sender, Packet Pack) | ||
8251 | { | ||
8252 | ObjectSaleInfoPacket objectSaleInfoPacket = (ObjectSaleInfoPacket)Pack; | ||
8253 | |||
8254 | #region Packet Session and User Check | ||
8255 | if (m_checkPackets) | ||
8256 | { | ||
8257 | if (objectSaleInfoPacket.AgentData.SessionID != SessionId || | ||
8258 | objectSaleInfoPacket.AgentData.AgentID != AgentId) | ||
8259 | return true; | ||
8260 | } | ||
8261 | #endregion | ||
8262 | |||
8263 | ObjectSaleInfo handlerObjectSaleInfo = OnObjectSaleInfo; | ||
8264 | if (handlerObjectSaleInfo != null) | ||
8265 | { | ||
8266 | foreach (ObjectSaleInfoPacket.ObjectDataBlock d | ||
8267 | in objectSaleInfoPacket.ObjectData) | ||
8268 | { | ||
8269 | handlerObjectSaleInfo(this, | ||
8270 | objectSaleInfoPacket.AgentData.AgentID, | ||
8271 | objectSaleInfoPacket.AgentData.SessionID, | ||
8272 | d.LocalID, | ||
8273 | d.SaleType, | ||
8274 | d.SalePrice); | ||
8275 | } | ||
8276 | } | ||
8277 | return true; | ||
8278 | } | ||
8279 | private bool HandleObjectBuy(IClientAPI sender, Packet Pack) | ||
8280 | { | ||
8281 | ObjectBuyPacket objectBuyPacket = (ObjectBuyPacket)Pack; | ||
8282 | |||
8283 | #region Packet Session and User Check | ||
8284 | if (m_checkPackets) | ||
8285 | { | ||
8286 | if (objectBuyPacket.AgentData.SessionID != SessionId || | ||
8287 | objectBuyPacket.AgentData.AgentID != AgentId) | ||
8288 | return true; | ||
8289 | } | ||
8290 | #endregion | ||
8291 | |||
8292 | ObjectBuy handlerObjectBuy = OnObjectBuy; | ||
8293 | |||
8294 | if (handlerObjectBuy != null) | ||
8295 | { | ||
8296 | foreach (ObjectBuyPacket.ObjectDataBlock d | ||
8297 | in objectBuyPacket.ObjectData) | ||
8298 | { | ||
8299 | handlerObjectBuy(this, | ||
8300 | objectBuyPacket.AgentData.AgentID, | ||
8301 | objectBuyPacket.AgentData.SessionID, | ||
8302 | objectBuyPacket.AgentData.GroupID, | ||
8303 | objectBuyPacket.AgentData.CategoryID, | ||
8304 | d.ObjectLocalID, | ||
8305 | d.SaleType, | ||
8306 | d.SalePrice); | ||
8307 | } | ||
8308 | } | ||
8309 | return true; | ||
8310 | } | ||
8311 | |||
8312 | #endregion Economy/Transaction Packets | ||
8313 | |||
8314 | #region Script Packets | ||
8315 | private bool HandleGetScriptRunning(IClientAPI sender, Packet Pack) | ||
8316 | { | ||
8317 | GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack; | ||
8318 | |||
8319 | GetScriptRunning handlerGetScriptRunning = OnGetScriptRunning; | ||
8320 | if (handlerGetScriptRunning != null) | ||
8321 | { | ||
8322 | handlerGetScriptRunning(this, scriptRunning.Script.ObjectID, scriptRunning.Script.ItemID); | ||
8323 | } | ||
8324 | return true; | ||
8325 | } | ||
8326 | private bool HandleSetScriptRunning(IClientAPI sender, Packet Pack) | ||
8327 | { | ||
8328 | SetScriptRunningPacket setScriptRunning = (SetScriptRunningPacket)Pack; | ||
8329 | |||
8330 | #region Packet Session and User Check | ||
8331 | if (m_checkPackets) | ||
8332 | { | ||
8333 | if (setScriptRunning.AgentData.SessionID != SessionId || | ||
8334 | setScriptRunning.AgentData.AgentID != AgentId) | ||
8335 | return true; | ||
8336 | } | ||
8337 | #endregion | ||
8338 | |||
8339 | SetScriptRunning handlerSetScriptRunning = OnSetScriptRunning; | ||
8340 | if (handlerSetScriptRunning != null) | ||
8341 | { | ||
8342 | handlerSetScriptRunning(this, setScriptRunning.Script.ObjectID, setScriptRunning.Script.ItemID, setScriptRunning.Script.Running); | ||
8343 | } | ||
8344 | return true; | ||
8345 | } | ||
8346 | |||
8347 | private bool HandleScriptReset(IClientAPI sender, Packet Pack) | ||
8348 | { | ||
8349 | ScriptResetPacket scriptResetPacket = (ScriptResetPacket)Pack; | ||
8350 | |||
8351 | #region Packet Session and User Check | ||
8352 | if (m_checkPackets) | ||
8353 | { | ||
8354 | if (scriptResetPacket.AgentData.SessionID != SessionId || | ||
8355 | scriptResetPacket.AgentData.AgentID != AgentId) | ||
8356 | return true; | ||
8357 | } | ||
8358 | #endregion | ||
8359 | |||
8360 | ScriptReset handlerScriptReset = OnScriptReset; | ||
8361 | if (handlerScriptReset != null) | ||
8362 | { | ||
8363 | handlerScriptReset(this, scriptResetPacket.Script.ObjectID, scriptResetPacket.Script.ItemID); | ||
8364 | } | ||
8365 | return true; | ||
8366 | } | ||
8367 | |||
8368 | #endregion Script Packets | ||
8369 | |||
8370 | #region Gesture Managment | ||
8371 | |||
8372 | private bool HandleActivateGestures(IClientAPI sender, Packet Pack) | ||
8373 | { | ||
8374 | ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack; | ||
8375 | |||
8376 | #region Packet Session and User Check | ||
8377 | if (m_checkPackets) | ||
8378 | { | ||
8379 | if (activateGesturePacket.AgentData.SessionID != SessionId || | ||
8380 | activateGesturePacket.AgentData.AgentID != AgentId) | ||
8381 | return true; | ||
8382 | } | ||
8383 | #endregion | ||
8384 | |||
8385 | ActivateGesture handlerActivateGesture = OnActivateGesture; | ||
8386 | if (handlerActivateGesture != null) | ||
8387 | { | ||
8388 | handlerActivateGesture(this, | ||
8389 | activateGesturePacket.Data[0].AssetID, | ||
8390 | activateGesturePacket.Data[0].ItemID); | ||
8391 | } | ||
8392 | else m_log.Error("Null pointer for activateGesture"); | ||
8393 | |||
8394 | return true; | ||
8395 | } | ||
8396 | private bool HandleDeactivateGestures(IClientAPI sender, Packet Pack) | ||
8397 | { | ||
8398 | DeactivateGesturesPacket deactivateGesturePacket = (DeactivateGesturesPacket)Pack; | ||
8399 | |||
8400 | #region Packet Session and User Check | ||
8401 | if (m_checkPackets) | ||
8402 | { | ||
8403 | if (deactivateGesturePacket.AgentData.SessionID != SessionId || | ||
8404 | deactivateGesturePacket.AgentData.AgentID != AgentId) | ||
8405 | return true; | ||
8406 | } | ||
8407 | #endregion | ||
8408 | |||
8409 | DeactivateGesture handlerDeactivateGesture = OnDeactivateGesture; | ||
8410 | if (handlerDeactivateGesture != null) | ||
8411 | { | ||
8412 | handlerDeactivateGesture(this, deactivateGesturePacket.Data[0].ItemID); | ||
8413 | } | ||
8414 | return true; | ||
8415 | } | ||
8416 | private bool HandleObjectOwner(IClientAPI sender, Packet Pack) | ||
8417 | { | ||
8418 | ObjectOwnerPacket objectOwnerPacket = (ObjectOwnerPacket)Pack; | ||
8419 | |||
8420 | #region Packet Session and User Check | ||
8421 | if (m_checkPackets) | ||
8422 | { | ||
8423 | if (objectOwnerPacket.AgentData.SessionID != SessionId || | ||
8424 | objectOwnerPacket.AgentData.AgentID != AgentId) | ||
8425 | return true; | ||
8426 | } | ||
8427 | #endregion | ||
8428 | |||
8429 | List<uint> localIDs = new List<uint>(); | ||
8430 | |||
8431 | foreach (ObjectOwnerPacket.ObjectDataBlock d in objectOwnerPacket.ObjectData) | ||
8432 | localIDs.Add(d.ObjectLocalID); | ||
8433 | |||
8434 | ObjectOwner handlerObjectOwner = OnObjectOwner; | ||
8435 | if (handlerObjectOwner != null) | ||
8436 | { | ||
8437 | handlerObjectOwner(this, objectOwnerPacket.HeaderData.OwnerID, objectOwnerPacket.HeaderData.GroupID, localIDs); | ||
8438 | } | ||
8439 | return true; | ||
8440 | } | ||
8441 | |||
8442 | #endregion Gesture Managment | ||
8443 | |||
8444 | private bool HandleAgentFOV(IClientAPI sender, Packet Pack) | ||
8445 | { | ||
8446 | AgentFOVPacket fovPacket = (AgentFOVPacket)Pack; | ||
8447 | |||
8448 | if (fovPacket.FOVBlock.GenCounter > m_agentFOVCounter) | ||
8449 | { | ||
8450 | m_agentFOVCounter = fovPacket.FOVBlock.GenCounter; | ||
8451 | AgentFOV handlerAgentFOV = OnAgentFOV; | ||
8452 | if (handlerAgentFOV != null) | ||
8453 | { | ||
8454 | handlerAgentFOV(this, fovPacket.FOVBlock.VerticalAngle); | ||
8455 | } | ||
8456 | } | ||
8457 | return true; | ||
8458 | } | ||
8459 | |||
8460 | #region unimplemented handlers | ||
8461 | |||
8462 | private bool HandleViewerStats(IClientAPI sender, Packet Pack) | ||
8463 | { | ||
8464 | // TODO: handle this packet | ||
8465 | //m_log.Warn("[CLIENT]: unhandled ViewerStats packet"); | ||
8466 | return true; | ||
8467 | } | ||
8468 | |||
8469 | private bool HandleMapItemRequest(IClientAPI sender, Packet Pack) | ||
8470 | { | ||
8471 | MapItemRequestPacket mirpk = (MapItemRequestPacket)Pack; | ||
8472 | |||
8473 | #region Packet Session and User Check | ||
8474 | if (m_checkPackets) | ||
8475 | { | ||
8476 | if (mirpk.AgentData.SessionID != SessionId || | ||
8477 | mirpk.AgentData.AgentID != AgentId) | ||
8478 | return true; | ||
8479 | } | ||
8480 | #endregion | ||
8481 | |||
8482 | //m_log.Debug(mirpk.ToString()); | ||
8483 | MapItemRequest handlerMapItemRequest = OnMapItemRequest; | ||
8484 | if (handlerMapItemRequest != null) | ||
8485 | { | ||
8486 | handlerMapItemRequest(this, mirpk.AgentData.Flags, mirpk.AgentData.EstateID, | ||
8487 | mirpk.AgentData.Godlike, mirpk.RequestData.ItemType, | ||
8488 | mirpk.RequestData.RegionHandle); | ||
8489 | |||
8490 | } | ||
8491 | return true; | ||
8492 | } | ||
8493 | |||
8494 | private bool HandleTransferAbort(IClientAPI sender, Packet Pack) | ||
8495 | { | ||
8496 | return true; | ||
8497 | } | ||
8498 | |||
8499 | private bool HandleMuteListRequest(IClientAPI sender, Packet Pack) | ||
8500 | { | ||
8501 | MuteListRequestPacket muteListRequest = | ||
8502 | (MuteListRequestPacket)Pack; | ||
8503 | |||
8504 | #region Packet Session and User Check | ||
8505 | if (m_checkPackets) | ||
8506 | { | ||
8507 | if (muteListRequest.AgentData.SessionID != SessionId || | ||
8508 | muteListRequest.AgentData.AgentID != AgentId) | ||
8509 | return true; | ||
8510 | } | ||
8511 | #endregion | ||
8512 | |||
8513 | MuteListRequest handlerMuteListRequest = OnMuteListRequest; | ||
8514 | if (handlerMuteListRequest != null) | ||
8515 | { | ||
8516 | handlerMuteListRequest(this, muteListRequest.MuteData.MuteCRC); | ||
8517 | } | ||
8518 | else | ||
8519 | { | ||
8520 | SendUseCachedMuteList(); | ||
8521 | } | ||
8522 | return true; | ||
8523 | } | ||
8524 | |||
8525 | private bool HandleUseCircuitCode(IClientAPI sender, Packet Pack) | ||
8526 | { | ||
8527 | return true; | ||
8528 | } | ||
8529 | |||
8530 | private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack) | ||
8531 | { | ||
8532 | return true; | ||
8533 | } | ||
8534 | |||
8535 | private bool HandleInventoryDescendents(IClientAPI sender, Packet Pack) | ||
8536 | { | ||
8537 | return true; | ||
8538 | } | ||
8539 | |||
8540 | #endregion unimplemented handlers | ||
8541 | |||
8542 | #region Dir handlers | ||
8543 | |||
8544 | private bool HandleDirPlacesQuery(IClientAPI sender, Packet Pack) | ||
8545 | { | ||
8546 | DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack; | ||
8547 | //m_log.Debug(dirPlacesQueryPacket.ToString()); | ||
8548 | |||
8549 | #region Packet Session and User Check | ||
8550 | if (m_checkPackets) | ||
8551 | { | ||
8552 | if (dirPlacesQueryPacket.AgentData.SessionID != SessionId || | ||
8553 | dirPlacesQueryPacket.AgentData.AgentID != AgentId) | ||
8554 | return true; | ||
8555 | } | ||
8556 | #endregion | ||
8557 | |||
8558 | DirPlacesQuery handlerDirPlacesQuery = OnDirPlacesQuery; | ||
8559 | if (handlerDirPlacesQuery != null) | ||
8560 | { | ||
8561 | handlerDirPlacesQuery(this, | ||
8562 | dirPlacesQueryPacket.QueryData.QueryID, | ||
8563 | Utils.BytesToString( | ||
8564 | dirPlacesQueryPacket.QueryData.QueryText), | ||
8565 | (int)dirPlacesQueryPacket.QueryData.QueryFlags, | ||
8566 | (int)dirPlacesQueryPacket.QueryData.Category, | ||
8567 | Utils.BytesToString( | ||
8568 | dirPlacesQueryPacket.QueryData.SimName), | ||
8569 | dirPlacesQueryPacket.QueryData.QueryStart); | ||
8570 | } | ||
8571 | return true; | ||
8572 | } | ||
8573 | |||
8574 | private bool HandleDirFindQuery(IClientAPI sender, Packet Pack) | ||
8575 | { | ||
8576 | DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack; | ||
8577 | |||
8578 | #region Packet Session and User Check | ||
8579 | if (m_checkPackets) | ||
8580 | { | ||
8581 | if (dirFindQueryPacket.AgentData.SessionID != SessionId || | ||
8582 | dirFindQueryPacket.AgentData.AgentID != AgentId) | ||
8583 | return true; | ||
8584 | } | ||
8585 | #endregion | ||
8586 | |||
8587 | DirFindQuery handlerDirFindQuery = OnDirFindQuery; | ||
8588 | if (handlerDirFindQuery != null) | ||
8589 | { | ||
8590 | handlerDirFindQuery(this, | ||
8591 | dirFindQueryPacket.QueryData.QueryID, | ||
8592 | Utils.BytesToString( | ||
8593 | dirFindQueryPacket.QueryData.QueryText), | ||
8594 | dirFindQueryPacket.QueryData.QueryFlags, | ||
8595 | dirFindQueryPacket.QueryData.QueryStart); | ||
8596 | } | ||
8597 | return true; | ||
8598 | } | ||
8599 | |||
8600 | private bool HandleDirLandQuery(IClientAPI sender, Packet Pack) | ||
8601 | { | ||
8602 | DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack; | ||
8603 | |||
8604 | #region Packet Session and User Check | ||
8605 | if (m_checkPackets) | ||
8606 | { | ||
8607 | if (dirLandQueryPacket.AgentData.SessionID != SessionId || | ||
8608 | dirLandQueryPacket.AgentData.AgentID != AgentId) | ||
8609 | return true; | ||
8610 | } | ||
8611 | #endregion | ||
8612 | |||
8613 | DirLandQuery handlerDirLandQuery = OnDirLandQuery; | ||
8614 | if (handlerDirLandQuery != null) | ||
8615 | { | ||
8616 | handlerDirLandQuery(this, | ||
8617 | dirLandQueryPacket.QueryData.QueryID, | ||
8618 | dirLandQueryPacket.QueryData.QueryFlags, | ||
8619 | dirLandQueryPacket.QueryData.SearchType, | ||
8620 | dirLandQueryPacket.QueryData.Price, | ||
8621 | dirLandQueryPacket.QueryData.Area, | ||
8622 | dirLandQueryPacket.QueryData.QueryStart); | ||
8623 | } | ||
8624 | return true; | ||
8625 | } | ||
8626 | |||
8627 | private bool HandleDirPopularQuery(IClientAPI sender, Packet Pack) | ||
8628 | { | ||
8629 | DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack; | ||
8630 | |||
8631 | #region Packet Session and User Check | ||
8632 | if (m_checkPackets) | ||
8633 | { | ||
8634 | if (dirPopularQueryPacket.AgentData.SessionID != SessionId || | ||
8635 | dirPopularQueryPacket.AgentData.AgentID != AgentId) | ||
8636 | return true; | ||
8637 | } | ||
8638 | #endregion | ||
8639 | |||
8640 | DirPopularQuery handlerDirPopularQuery = OnDirPopularQuery; | ||
8641 | if (handlerDirPopularQuery != null) | ||
8642 | { | ||
8643 | handlerDirPopularQuery(this, | ||
8644 | dirPopularQueryPacket.QueryData.QueryID, | ||
8645 | dirPopularQueryPacket.QueryData.QueryFlags); | ||
8646 | } | ||
8647 | return true; | ||
8648 | } | ||
8649 | |||
8650 | private bool HandleDirClassifiedQuery(IClientAPI sender, Packet Pack) | ||
8651 | { | ||
8652 | DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack; | ||
8653 | |||
8654 | #region Packet Session and User Check | ||
8655 | if (m_checkPackets) | ||
8656 | { | ||
8657 | if (dirClassifiedQueryPacket.AgentData.SessionID != SessionId || | ||
8658 | dirClassifiedQueryPacket.AgentData.AgentID != AgentId) | ||
8659 | return true; | ||
8660 | } | ||
8661 | #endregion | ||
8662 | |||
8663 | DirClassifiedQuery handlerDirClassifiedQuery = OnDirClassifiedQuery; | ||
8664 | if (handlerDirClassifiedQuery != null) | ||
8665 | { | ||
8666 | handlerDirClassifiedQuery(this, | ||
8667 | dirClassifiedQueryPacket.QueryData.QueryID, | ||
8668 | Utils.BytesToString( | ||
8669 | dirClassifiedQueryPacket.QueryData.QueryText), | ||
8670 | dirClassifiedQueryPacket.QueryData.QueryFlags, | ||
8671 | dirClassifiedQueryPacket.QueryData.Category, | ||
8672 | dirClassifiedQueryPacket.QueryData.QueryStart); | ||
8673 | } | ||
8674 | return true; | ||
8675 | } | ||
8676 | |||
8677 | private bool HandleEventInfoRequest(IClientAPI sender, Packet Pack) | ||
8678 | { | ||
8679 | EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack; | ||
8680 | |||
8681 | #region Packet Session and User Check | ||
8682 | if (m_checkPackets) | ||
8683 | { | ||
8684 | if (eventInfoRequestPacket.AgentData.SessionID != SessionId || | ||
8685 | eventInfoRequestPacket.AgentData.AgentID != AgentId) | ||
8686 | return true; | ||
8687 | } | ||
8688 | #endregion | ||
8689 | |||
8690 | if (OnEventInfoRequest != null) | ||
8691 | { | ||
8692 | OnEventInfoRequest(this, eventInfoRequestPacket.EventData.EventID); | ||
8693 | } | ||
8694 | return true; | ||
8695 | } | ||
8696 | |||
8697 | #endregion | ||
8698 | |||
8699 | #region Calling Card | ||
8700 | |||
8701 | private bool HandleOfferCallingCard(IClientAPI sender, Packet Pack) | ||
8702 | { | ||
8703 | OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack; | ||
8704 | |||
8705 | #region Packet Session and User Check | ||
8706 | if (m_checkPackets) | ||
8707 | { | ||
8708 | if (offerCallingCardPacket.AgentData.SessionID != SessionId || | ||
8709 | offerCallingCardPacket.AgentData.AgentID != AgentId) | ||
8710 | return true; | ||
8711 | } | ||
8712 | #endregion | ||
8713 | |||
8714 | if (OnOfferCallingCard != null) | ||
8715 | { | ||
8716 | OnOfferCallingCard(this, | ||
8717 | offerCallingCardPacket.AgentBlock.DestID, | ||
8718 | offerCallingCardPacket.AgentBlock.TransactionID); | ||
8719 | } | ||
8720 | return true; | ||
8721 | } | ||
8722 | |||
8723 | private bool HandleAcceptCallingCard(IClientAPI sender, Packet Pack) | ||
8724 | { | ||
8725 | AcceptCallingCardPacket acceptCallingCardPacket = (AcceptCallingCardPacket)Pack; | ||
8726 | |||
8727 | #region Packet Session and User Check | ||
8728 | if (m_checkPackets) | ||
8729 | { | ||
8730 | if (acceptCallingCardPacket.AgentData.SessionID != SessionId || | ||
8731 | acceptCallingCardPacket.AgentData.AgentID != AgentId) | ||
8732 | return true; | ||
8733 | } | ||
8734 | #endregion | ||
8735 | |||
8736 | // according to http://wiki.secondlife.com/wiki/AcceptCallingCard FolderData should | ||
8737 | // contain exactly one entry | ||
8738 | if (OnAcceptCallingCard != null && acceptCallingCardPacket.FolderData.Length > 0) | ||
8739 | { | ||
8740 | OnAcceptCallingCard(this, | ||
8741 | acceptCallingCardPacket.TransactionBlock.TransactionID, | ||
8742 | acceptCallingCardPacket.FolderData[0].FolderID); | ||
8743 | } | ||
8744 | return true; | ||
8745 | } | ||
8746 | |||
8747 | private bool HandleDeclineCallingCard(IClientAPI sender, Packet Pack) | ||
8748 | { | ||
8749 | DeclineCallingCardPacket declineCallingCardPacket = (DeclineCallingCardPacket)Pack; | ||
8750 | |||
8751 | #region Packet Session and User Check | ||
8752 | if (m_checkPackets) | ||
8753 | { | ||
8754 | if (declineCallingCardPacket.AgentData.SessionID != SessionId || | ||
8755 | declineCallingCardPacket.AgentData.AgentID != AgentId) | ||
8756 | return true; | ||
8757 | } | ||
8758 | #endregion | ||
8759 | |||
8760 | if (OnDeclineCallingCard != null) | ||
8761 | { | ||
8762 | OnDeclineCallingCard(this, | ||
8763 | declineCallingCardPacket.TransactionBlock.TransactionID); | ||
8764 | } | ||
8765 | return true; | ||
8766 | } | ||
8767 | |||
8768 | #endregion Calling Card | ||
8769 | |||
8770 | #region Groups | ||
8771 | |||
8772 | private bool HandleActivateGroup(IClientAPI sender, Packet Pack) | ||
8773 | { | ||
8774 | ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack; | ||
8775 | |||
8776 | #region Packet Session and User Check | ||
8777 | if (m_checkPackets) | ||
8778 | { | ||
8779 | if (activateGroupPacket.AgentData.SessionID != SessionId || | ||
8780 | activateGroupPacket.AgentData.AgentID != AgentId) | ||
8781 | return true; | ||
8782 | } | ||
8783 | #endregion | ||
8784 | |||
8785 | if (m_GroupsModule != null) | ||
8786 | { | ||
8787 | m_GroupsModule.ActivateGroup(this, activateGroupPacket.AgentData.GroupID); | ||
8788 | m_GroupsModule.SendAgentGroupDataUpdate(this); | ||
8789 | } | ||
8790 | return true; | ||
8791 | |||
8792 | } | ||
8793 | |||
8794 | private bool HandleGroupTitlesRequest(IClientAPI sender, Packet Pack) | ||
8795 | { | ||
8796 | GroupTitlesRequestPacket groupTitlesRequest = | ||
8797 | (GroupTitlesRequestPacket)Pack; | ||
8798 | |||
8799 | #region Packet Session and User Check | ||
8800 | if (m_checkPackets) | ||
8801 | { | ||
8802 | if (groupTitlesRequest.AgentData.SessionID != SessionId || | ||
8803 | groupTitlesRequest.AgentData.AgentID != AgentId) | ||
8804 | return true; | ||
8805 | } | ||
8806 | #endregion | ||
8807 | |||
8808 | if (m_GroupsModule != null) | ||
8809 | { | ||
8810 | GroupTitlesReplyPacket groupTitlesReply = (GroupTitlesReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupTitlesReply); | ||
8811 | |||
8812 | groupTitlesReply.AgentData = | ||
8813 | new GroupTitlesReplyPacket.AgentDataBlock(); | ||
8814 | |||
8815 | groupTitlesReply.AgentData.AgentID = AgentId; | ||
8816 | groupTitlesReply.AgentData.GroupID = | ||
8817 | groupTitlesRequest.AgentData.GroupID; | ||
8818 | |||
8819 | groupTitlesReply.AgentData.RequestID = | ||
8820 | groupTitlesRequest.AgentData.RequestID; | ||
8821 | |||
8822 | List<GroupTitlesData> titles = | ||
8823 | m_GroupsModule.GroupTitlesRequest(this, | ||
8824 | groupTitlesRequest.AgentData.GroupID); | ||
8825 | |||
8826 | groupTitlesReply.GroupData = | ||
8827 | new GroupTitlesReplyPacket.GroupDataBlock[titles.Count]; | ||
8828 | |||
8829 | int i = 0; | ||
8830 | foreach (GroupTitlesData d in titles) | ||
8831 | { | ||
8832 | groupTitlesReply.GroupData[i] = | ||
8833 | new GroupTitlesReplyPacket.GroupDataBlock(); | ||
8834 | |||
8835 | groupTitlesReply.GroupData[i].Title = | ||
8836 | Util.StringToBytes256(d.Name); | ||
8837 | groupTitlesReply.GroupData[i].RoleID = | ||
8838 | d.UUID; | ||
8839 | groupTitlesReply.GroupData[i].Selected = | ||
8840 | d.Selected; | ||
8841 | i++; | ||
8842 | } | ||
8843 | |||
8844 | OutPacket(groupTitlesReply, ThrottleOutPacketType.Task); | ||
8845 | } | ||
8846 | return true; | ||
8847 | } | ||
8848 | private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack) | ||
8849 | { | ||
8850 | GroupProfileRequestPacket groupProfileRequest = | ||
8851 | (GroupProfileRequestPacket)Pack; | ||
8852 | |||
8853 | #region Packet Session and User Check | ||
8854 | if (m_checkPackets) | ||
8855 | { | ||
8856 | if (groupProfileRequest.AgentData.SessionID != SessionId || | ||
8857 | groupProfileRequest.AgentData.AgentID != AgentId) | ||
8858 | return true; | ||
8859 | } | ||
8860 | #endregion | ||
8861 | |||
8862 | if (m_GroupsModule != null) | ||
8863 | { | ||
8864 | GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply); | ||
8865 | |||
8866 | groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock(); | ||
8867 | groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock(); | ||
8868 | groupProfileReply.AgentData.AgentID = AgentId; | ||
8869 | |||
8870 | GroupProfileData d = m_GroupsModule.GroupProfileRequest(this, | ||
8871 | groupProfileRequest.GroupData.GroupID); | ||
8872 | |||
8873 | groupProfileReply.GroupData.GroupID = d.GroupID; | ||
8874 | groupProfileReply.GroupData.Name = Util.StringToBytes256(d.Name); | ||
8875 | groupProfileReply.GroupData.Charter = Util.StringToBytes1024(d.Charter); | ||
8876 | groupProfileReply.GroupData.ShowInList = d.ShowInList; | ||
8877 | groupProfileReply.GroupData.MemberTitle = Util.StringToBytes256(d.MemberTitle); | ||
8878 | groupProfileReply.GroupData.PowersMask = d.PowersMask; | ||
8879 | groupProfileReply.GroupData.InsigniaID = d.InsigniaID; | ||
8880 | groupProfileReply.GroupData.FounderID = d.FounderID; | ||
8881 | groupProfileReply.GroupData.MembershipFee = d.MembershipFee; | ||
8882 | groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment; | ||
8883 | groupProfileReply.GroupData.Money = d.Money; | ||
8884 | groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount; | ||
8885 | groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount; | ||
8886 | groupProfileReply.GroupData.AllowPublish = d.AllowPublish; | ||
8887 | groupProfileReply.GroupData.MaturePublish = d.MaturePublish; | ||
8888 | groupProfileReply.GroupData.OwnerRole = d.OwnerRole; | ||
8889 | |||
8890 | OutPacket(groupProfileReply, ThrottleOutPacketType.Task); | ||
8891 | } | ||
8892 | return true; | ||
8893 | } | ||
8894 | private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack) | ||
8895 | { | ||
8896 | GroupMembersRequestPacket groupMembersRequestPacket = | ||
8897 | (GroupMembersRequestPacket)Pack; | ||
8898 | |||
8899 | #region Packet Session and User Check | ||
8900 | if (m_checkPackets) | ||
8901 | { | ||
8902 | if (groupMembersRequestPacket.AgentData.SessionID != SessionId || | ||
8903 | groupMembersRequestPacket.AgentData.AgentID != AgentId) | ||
8904 | return true; | ||
8905 | } | ||
8906 | #endregion | ||
8907 | |||
8908 | if (m_GroupsModule != null) | ||
8909 | { | ||
8910 | List<GroupMembersData> members = | ||
8911 | m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID); | ||
8912 | |||
8913 | int memberCount = members.Count; | ||
8914 | |||
8915 | while (true) | ||
8916 | { | ||
8917 | int blockCount = members.Count; | ||
8918 | if (blockCount > 40) | ||
8919 | blockCount = 40; | ||
8920 | |||
8921 | GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply); | ||
8922 | |||
8923 | groupMembersReply.AgentData = | ||
8924 | new GroupMembersReplyPacket.AgentDataBlock(); | ||
8925 | groupMembersReply.GroupData = | ||
8926 | new GroupMembersReplyPacket.GroupDataBlock(); | ||
8927 | groupMembersReply.MemberData = | ||
8928 | new GroupMembersReplyPacket.MemberDataBlock[ | ||
8929 | blockCount]; | ||
8930 | |||
8931 | groupMembersReply.AgentData.AgentID = AgentId; | ||
8932 | groupMembersReply.GroupData.GroupID = | ||
8933 | groupMembersRequestPacket.GroupData.GroupID; | ||
8934 | groupMembersReply.GroupData.RequestID = | ||
8935 | groupMembersRequestPacket.GroupData.RequestID; | ||
8936 | groupMembersReply.GroupData.MemberCount = memberCount; | ||
8937 | |||
8938 | for (int i = 0; i < blockCount; i++) | ||
8939 | { | ||
8940 | GroupMembersData m = members[0]; | ||
8941 | members.RemoveAt(0); | ||
8942 | |||
8943 | groupMembersReply.MemberData[i] = | ||
8944 | new GroupMembersReplyPacket.MemberDataBlock(); | ||
8945 | groupMembersReply.MemberData[i].AgentID = | ||
8946 | m.AgentID; | ||
8947 | groupMembersReply.MemberData[i].Contribution = | ||
8948 | m.Contribution; | ||
8949 | groupMembersReply.MemberData[i].OnlineStatus = | ||
8950 | Util.StringToBytes256(m.OnlineStatus); | ||
8951 | groupMembersReply.MemberData[i].AgentPowers = | ||
8952 | m.AgentPowers; | ||
8953 | groupMembersReply.MemberData[i].Title = | ||
8954 | Util.StringToBytes256(m.Title); | ||
8955 | groupMembersReply.MemberData[i].IsOwner = | ||
8956 | m.IsOwner; | ||
8957 | } | ||
8958 | OutPacket(groupMembersReply, ThrottleOutPacketType.Task); | ||
8959 | if (members.Count == 0) | ||
8960 | return true; | ||
8961 | } | ||
8962 | } | ||
8963 | return true; | ||
8964 | } | ||
8965 | private bool HandleGroupRoleDataRequest(IClientAPI sender, Packet Pack) | ||
8966 | { | ||
8967 | GroupRoleDataRequestPacket groupRolesRequest = | ||
8968 | (GroupRoleDataRequestPacket)Pack; | ||
8969 | |||
8970 | #region Packet Session and User Check | ||
8971 | if (m_checkPackets) | ||
8972 | { | ||
8973 | if (groupRolesRequest.AgentData.SessionID != SessionId || | ||
8974 | groupRolesRequest.AgentData.AgentID != AgentId) | ||
8975 | return true; | ||
8976 | } | ||
8977 | #endregion | ||
8978 | |||
8979 | if (m_GroupsModule != null) | ||
8980 | { | ||
8981 | GroupRoleDataReplyPacket groupRolesReply = (GroupRoleDataReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleDataReply); | ||
8982 | |||
8983 | groupRolesReply.AgentData = | ||
8984 | new GroupRoleDataReplyPacket.AgentDataBlock(); | ||
8985 | |||
8986 | groupRolesReply.AgentData.AgentID = AgentId; | ||
8987 | |||
8988 | groupRolesReply.GroupData = | ||
8989 | new GroupRoleDataReplyPacket.GroupDataBlock(); | ||
8990 | |||
8991 | groupRolesReply.GroupData.GroupID = | ||
8992 | groupRolesRequest.GroupData.GroupID; | ||
8993 | |||
8994 | groupRolesReply.GroupData.RequestID = | ||
8995 | groupRolesRequest.GroupData.RequestID; | ||
8996 | |||
8997 | List<GroupRolesData> titles = | ||
8998 | m_GroupsModule.GroupRoleDataRequest(this, | ||
8999 | groupRolesRequest.GroupData.GroupID); | ||
9000 | |||
9001 | groupRolesReply.GroupData.RoleCount = | ||
9002 | titles.Count; | ||
9003 | |||
9004 | groupRolesReply.RoleData = | ||
9005 | new GroupRoleDataReplyPacket.RoleDataBlock[titles.Count]; | ||
9006 | |||
9007 | int i = 0; | ||
9008 | foreach (GroupRolesData d in titles) | ||
9009 | { | ||
9010 | groupRolesReply.RoleData[i] = | ||
9011 | new GroupRoleDataReplyPacket.RoleDataBlock(); | ||
9012 | |||
9013 | groupRolesReply.RoleData[i].RoleID = | ||
9014 | d.RoleID; | ||
9015 | groupRolesReply.RoleData[i].Name = | ||
9016 | Util.StringToBytes256(d.Name); | ||
9017 | groupRolesReply.RoleData[i].Title = | ||
9018 | Util.StringToBytes256(d.Title); | ||
9019 | groupRolesReply.RoleData[i].Description = | ||
9020 | Util.StringToBytes1024(d.Description); | ||
9021 | groupRolesReply.RoleData[i].Powers = | ||
9022 | d.Powers; | ||
9023 | groupRolesReply.RoleData[i].Members = | ||
9024 | (uint)d.Members; | ||
9025 | |||
9026 | i++; | ||
9027 | } | ||
9028 | |||
9029 | OutPacket(groupRolesReply, ThrottleOutPacketType.Task); | ||
9030 | } | ||
9031 | return true; | ||
9032 | } | ||
9033 | private bool HandleGroupRoleMembersRequest(IClientAPI sender, Packet Pack) | ||
9034 | { | ||
9035 | GroupRoleMembersRequestPacket groupRoleMembersRequest = | ||
9036 | (GroupRoleMembersRequestPacket)Pack; | ||
9037 | |||
9038 | #region Packet Session and User Check | ||
9039 | if (m_checkPackets) | ||
9040 | { | ||
9041 | if (groupRoleMembersRequest.AgentData.SessionID != SessionId || | ||
9042 | groupRoleMembersRequest.AgentData.AgentID != AgentId) | ||
9043 | return true; | ||
9044 | } | ||
9045 | #endregion | ||
9046 | |||
9047 | if (m_GroupsModule != null) | ||
9048 | { | ||
9049 | List<GroupRoleMembersData> mappings = | ||
9050 | m_GroupsModule.GroupRoleMembersRequest(this, | ||
9051 | groupRoleMembersRequest.GroupData.GroupID); | ||
9052 | |||
9053 | int mappingsCount = mappings.Count; | ||
9054 | |||
9055 | while (mappings.Count > 0) | ||
9056 | { | ||
9057 | int pairs = mappings.Count; | ||
9058 | if (pairs > 32) | ||
9059 | pairs = 32; | ||
9060 | |||
9061 | GroupRoleMembersReplyPacket groupRoleMembersReply = (GroupRoleMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupRoleMembersReply); | ||
9062 | groupRoleMembersReply.AgentData = | ||
9063 | new GroupRoleMembersReplyPacket.AgentDataBlock(); | ||
9064 | groupRoleMembersReply.AgentData.AgentID = | ||
9065 | AgentId; | ||
9066 | groupRoleMembersReply.AgentData.GroupID = | ||
9067 | groupRoleMembersRequest.GroupData.GroupID; | ||
9068 | groupRoleMembersReply.AgentData.RequestID = | ||
9069 | groupRoleMembersRequest.GroupData.RequestID; | ||
9070 | |||
9071 | groupRoleMembersReply.AgentData.TotalPairs = | ||
9072 | (uint)mappingsCount; | ||
9073 | |||
9074 | groupRoleMembersReply.MemberData = | ||
9075 | new GroupRoleMembersReplyPacket.MemberDataBlock[pairs]; | ||
9076 | |||
9077 | for (int i = 0; i < pairs; i++) | ||
9078 | { | ||
9079 | GroupRoleMembersData d = mappings[0]; | ||
9080 | mappings.RemoveAt(0); | ||
9081 | |||
9082 | groupRoleMembersReply.MemberData[i] = | ||
9083 | new GroupRoleMembersReplyPacket.MemberDataBlock(); | ||
9084 | |||
9085 | groupRoleMembersReply.MemberData[i].RoleID = | ||
9086 | d.RoleID; | ||
9087 | groupRoleMembersReply.MemberData[i].MemberID = | ||
9088 | d.MemberID; | ||
9089 | } | ||
9090 | |||
9091 | OutPacket(groupRoleMembersReply, ThrottleOutPacketType.Task); | ||
9092 | } | ||
9093 | } | ||
9094 | return true; | ||
9095 | } | ||
9096 | private bool HandleCreateGroupRequest(IClientAPI sender, Packet Pack) | ||
9097 | { | ||
9098 | CreateGroupRequestPacket createGroupRequest = | ||
9099 | (CreateGroupRequestPacket)Pack; | ||
9100 | |||
9101 | #region Packet Session and User Check | ||
9102 | if (m_checkPackets) | ||
9103 | { | ||
9104 | if (createGroupRequest.AgentData.SessionID != SessionId || | ||
9105 | createGroupRequest.AgentData.AgentID != AgentId) | ||
9106 | return true; | ||
9107 | } | ||
9108 | #endregion | ||
9109 | |||
9110 | if (m_GroupsModule != null) | ||
9111 | { | ||
9112 | m_GroupsModule.CreateGroup(this, | ||
9113 | Utils.BytesToString(createGroupRequest.GroupData.Name), | ||
9114 | Utils.BytesToString(createGroupRequest.GroupData.Charter), | ||
9115 | createGroupRequest.GroupData.ShowInList, | ||
9116 | createGroupRequest.GroupData.InsigniaID, | ||
9117 | createGroupRequest.GroupData.MembershipFee, | ||
9118 | createGroupRequest.GroupData.OpenEnrollment, | ||
9119 | createGroupRequest.GroupData.AllowPublish, | ||
9120 | createGroupRequest.GroupData.MaturePublish); | ||
9121 | } | ||
9122 | return true; | ||
9123 | } | ||
9124 | private bool HandleUpdateGroupInfo(IClientAPI sender, Packet Pack) | ||
9125 | { | ||
9126 | UpdateGroupInfoPacket updateGroupInfo = | ||
9127 | (UpdateGroupInfoPacket)Pack; | ||
9128 | |||
9129 | #region Packet Session and User Check | ||
9130 | if (m_checkPackets) | ||
9131 | { | ||
9132 | if (updateGroupInfo.AgentData.SessionID != SessionId || | ||
9133 | updateGroupInfo.AgentData.AgentID != AgentId) | ||
9134 | return true; | ||
9135 | } | ||
9136 | #endregion | ||
9137 | |||
9138 | if (m_GroupsModule != null) | ||
9139 | { | ||
9140 | m_GroupsModule.UpdateGroupInfo(this, | ||
9141 | updateGroupInfo.GroupData.GroupID, | ||
9142 | Utils.BytesToString(updateGroupInfo.GroupData.Charter), | ||
9143 | updateGroupInfo.GroupData.ShowInList, | ||
9144 | updateGroupInfo.GroupData.InsigniaID, | ||
9145 | updateGroupInfo.GroupData.MembershipFee, | ||
9146 | updateGroupInfo.GroupData.OpenEnrollment, | ||
9147 | updateGroupInfo.GroupData.AllowPublish, | ||
9148 | updateGroupInfo.GroupData.MaturePublish); | ||
9149 | } | ||
9150 | |||
9151 | return true; | ||
9152 | } | ||
9153 | private bool HandleSetGroupAcceptNotices(IClientAPI sender, Packet Pack) | ||
9154 | { | ||
9155 | SetGroupAcceptNoticesPacket setGroupAcceptNotices = | ||
9156 | (SetGroupAcceptNoticesPacket)Pack; | ||
9157 | |||
9158 | #region Packet Session and User Check | ||
9159 | if (m_checkPackets) | ||
9160 | { | ||
9161 | if (setGroupAcceptNotices.AgentData.SessionID != SessionId || | ||
9162 | setGroupAcceptNotices.AgentData.AgentID != AgentId) | ||
9163 | return true; | ||
9164 | } | ||
9165 | #endregion | ||
9166 | |||
9167 | if (m_GroupsModule != null) | ||
9168 | { | ||
9169 | m_GroupsModule.SetGroupAcceptNotices(this, | ||
9170 | setGroupAcceptNotices.Data.GroupID, | ||
9171 | setGroupAcceptNotices.Data.AcceptNotices, | ||
9172 | setGroupAcceptNotices.NewData.ListInProfile); | ||
9173 | } | ||
9174 | |||
9175 | return true; | ||
9176 | } | ||
9177 | private bool HandleGroupTitleUpdate(IClientAPI sender, Packet Pack) | ||
9178 | { | ||
9179 | GroupTitleUpdatePacket groupTitleUpdate = | ||
9180 | (GroupTitleUpdatePacket)Pack; | ||
9181 | |||
9182 | #region Packet Session and User Check | ||
9183 | if (m_checkPackets) | ||
9184 | { | ||
9185 | if (groupTitleUpdate.AgentData.SessionID != SessionId || | ||
9186 | groupTitleUpdate.AgentData.AgentID != AgentId) | ||
9187 | return true; | ||
9188 | } | ||
9189 | #endregion | ||
9190 | |||
9191 | if (m_GroupsModule != null) | ||
9192 | { | ||
9193 | m_GroupsModule.GroupTitleUpdate(this, | ||
9194 | groupTitleUpdate.AgentData.GroupID, | ||
9195 | groupTitleUpdate.AgentData.TitleRoleID); | ||
9196 | } | ||
9197 | |||
9198 | return true; | ||
9199 | } | ||
9200 | private bool HandleParcelDeedToGroup(IClientAPI sender, Packet Pack) | ||
9201 | { | ||
9202 | ParcelDeedToGroupPacket parcelDeedToGroup = (ParcelDeedToGroupPacket)Pack; | ||
9203 | if (m_GroupsModule != null) | ||
9204 | { | ||
9205 | ParcelDeedToGroup handlerParcelDeedToGroup = OnParcelDeedToGroup; | ||
9206 | if (handlerParcelDeedToGroup != null) | ||
9207 | { | ||
9208 | handlerParcelDeedToGroup(parcelDeedToGroup.Data.LocalID, parcelDeedToGroup.Data.GroupID, this); | ||
9209 | |||
9210 | } | ||
9211 | } | ||
9212 | |||
9213 | return true; | ||
9214 | } | ||
9215 | private bool HandleGroupNoticesListRequest(IClientAPI sender, Packet Pack) | ||
9216 | { | ||
9217 | GroupNoticesListRequestPacket groupNoticesListRequest = | ||
9218 | (GroupNoticesListRequestPacket)Pack; | ||
9219 | |||
9220 | #region Packet Session and User Check | ||
9221 | if (m_checkPackets) | ||
9222 | { | ||
9223 | if (groupNoticesListRequest.AgentData.SessionID != SessionId || | ||
9224 | groupNoticesListRequest.AgentData.AgentID != AgentId) | ||
9225 | return true; | ||
9226 | } | ||
9227 | #endregion | ||
9228 | |||
9229 | if (m_GroupsModule != null) | ||
9230 | { | ||
9231 | GroupNoticeData[] gn = | ||
9232 | m_GroupsModule.GroupNoticesListRequest(this, | ||
9233 | groupNoticesListRequest.Data.GroupID); | ||
9234 | |||
9235 | GroupNoticesListReplyPacket groupNoticesListReply = (GroupNoticesListReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupNoticesListReply); | ||
9236 | groupNoticesListReply.AgentData = | ||
9237 | new GroupNoticesListReplyPacket.AgentDataBlock(); | ||
9238 | groupNoticesListReply.AgentData.AgentID = AgentId; | ||
9239 | groupNoticesListReply.AgentData.GroupID = groupNoticesListRequest.Data.GroupID; | ||
9240 | |||
9241 | groupNoticesListReply.Data = new GroupNoticesListReplyPacket.DataBlock[gn.Length]; | ||
9242 | |||
9243 | int i = 0; | ||
9244 | foreach (GroupNoticeData g in gn) | ||
9245 | { | ||
9246 | groupNoticesListReply.Data[i] = new GroupNoticesListReplyPacket.DataBlock(); | ||
9247 | groupNoticesListReply.Data[i].NoticeID = | ||
9248 | g.NoticeID; | ||
9249 | groupNoticesListReply.Data[i].Timestamp = | ||
9250 | g.Timestamp; | ||
9251 | groupNoticesListReply.Data[i].FromName = | ||
9252 | Util.StringToBytes256(g.FromName); | ||
9253 | groupNoticesListReply.Data[i].Subject = | ||
9254 | Util.StringToBytes256(g.Subject); | ||
9255 | groupNoticesListReply.Data[i].HasAttachment = | ||
9256 | g.HasAttachment; | ||
9257 | groupNoticesListReply.Data[i].AssetType = | ||
9258 | g.AssetType; | ||
9259 | i++; | ||
9260 | } | ||
9261 | |||
9262 | OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task); | ||
9263 | } | ||
9264 | |||
9265 | return true; | ||
9266 | } | ||
9267 | private bool HandleGroupNoticeRequest(IClientAPI sender, Packet Pack) | ||
9268 | { | ||
9269 | GroupNoticeRequestPacket groupNoticeRequest = | ||
9270 | (GroupNoticeRequestPacket)Pack; | ||
9271 | |||
9272 | #region Packet Session and User Check | ||
9273 | if (m_checkPackets) | ||
9274 | { | ||
9275 | if (groupNoticeRequest.AgentData.SessionID != SessionId || | ||
9276 | groupNoticeRequest.AgentData.AgentID != AgentId) | ||
9277 | return true; | ||
9278 | } | ||
9279 | #endregion | ||
9280 | |||
9281 | if (m_GroupsModule != null) | ||
9282 | { | ||
9283 | m_GroupsModule.GroupNoticeRequest(this, | ||
9284 | groupNoticeRequest.Data.GroupNoticeID); | ||
9285 | } | ||
9286 | return true; | ||
9287 | } | ||
9288 | private bool HandleGroupRoleUpdate(IClientAPI sender, Packet Pack) | ||
9289 | { | ||
9290 | GroupRoleUpdatePacket groupRoleUpdate = | ||
9291 | (GroupRoleUpdatePacket)Pack; | ||
9292 | |||
9293 | #region Packet Session and User Check | ||
9294 | if (m_checkPackets) | ||
9295 | { | ||
9296 | if (groupRoleUpdate.AgentData.SessionID != SessionId || | ||
9297 | groupRoleUpdate.AgentData.AgentID != AgentId) | ||
9298 | return true; | ||
9299 | } | ||
9300 | #endregion | ||
9301 | |||
9302 | if (m_GroupsModule != null) | ||
9303 | { | ||
9304 | foreach (GroupRoleUpdatePacket.RoleDataBlock d in | ||
9305 | groupRoleUpdate.RoleData) | ||
9306 | { | ||
9307 | m_GroupsModule.GroupRoleUpdate(this, | ||
9308 | groupRoleUpdate.AgentData.GroupID, | ||
9309 | d.RoleID, | ||
9310 | Utils.BytesToString(d.Name), | ||
9311 | Utils.BytesToString(d.Description), | ||
9312 | Utils.BytesToString(d.Title), | ||
9313 | d.Powers, | ||
9314 | d.UpdateType); | ||
9315 | } | ||
9316 | m_GroupsModule.NotifyChange(groupRoleUpdate.AgentData.GroupID); | ||
9317 | } | ||
9318 | return true; | ||
9319 | } | ||
9320 | private bool HandleGroupRoleChanges(IClientAPI sender, Packet Pack) | ||
9321 | { | ||
9322 | GroupRoleChangesPacket groupRoleChanges = | ||
9323 | (GroupRoleChangesPacket)Pack; | ||
9324 | |||
9325 | #region Packet Session and User Check | ||
9326 | if (m_checkPackets) | ||
9327 | { | ||
9328 | if (groupRoleChanges.AgentData.SessionID != SessionId || | ||
9329 | groupRoleChanges.AgentData.AgentID != AgentId) | ||
9330 | return true; | ||
9331 | } | ||
9332 | #endregion | ||
9333 | |||
9334 | if (m_GroupsModule != null) | ||
9335 | { | ||
9336 | foreach (GroupRoleChangesPacket.RoleChangeBlock d in | ||
9337 | groupRoleChanges.RoleChange) | ||
9338 | { | ||
9339 | m_GroupsModule.GroupRoleChanges(this, | ||
9340 | groupRoleChanges.AgentData.GroupID, | ||
9341 | d.RoleID, | ||
9342 | d.MemberID, | ||
9343 | d.Change); | ||
9344 | } | ||
9345 | m_GroupsModule.NotifyChange(groupRoleChanges.AgentData.GroupID); | ||
9346 | } | ||
9347 | return true; | ||
9348 | } | ||
9349 | private bool HandleJoinGroupRequest(IClientAPI sender, Packet Pack) | ||
9350 | { | ||
9351 | JoinGroupRequestPacket joinGroupRequest = | ||
9352 | (JoinGroupRequestPacket)Pack; | ||
9353 | |||
9354 | #region Packet Session and User Check | ||
9355 | if (m_checkPackets) | ||
9356 | { | ||
9357 | if (joinGroupRequest.AgentData.SessionID != SessionId || | ||
9358 | joinGroupRequest.AgentData.AgentID != AgentId) | ||
9359 | return true; | ||
9360 | } | ||
9361 | #endregion | ||
9362 | |||
9363 | if (m_GroupsModule != null) | ||
9364 | { | ||
9365 | m_GroupsModule.JoinGroupRequest(this, | ||
9366 | joinGroupRequest.GroupData.GroupID); | ||
9367 | } | ||
9368 | return true; | ||
9369 | } | ||
9370 | private bool HandleLeaveGroupRequest(IClientAPI sender, Packet Pack) | ||
9371 | { | ||
9372 | LeaveGroupRequestPacket leaveGroupRequest = | ||
9373 | (LeaveGroupRequestPacket)Pack; | ||
9374 | |||
9375 | #region Packet Session and User Check | ||
9376 | if (m_checkPackets) | ||
9377 | { | ||
9378 | if (leaveGroupRequest.AgentData.SessionID != SessionId || | ||
9379 | leaveGroupRequest.AgentData.AgentID != AgentId) | ||
9380 | return true; | ||
9381 | } | ||
9382 | #endregion | ||
9383 | |||
9384 | if (m_GroupsModule != null) | ||
9385 | { | ||
9386 | m_GroupsModule.LeaveGroupRequest(this, | ||
9387 | leaveGroupRequest.GroupData.GroupID); | ||
9388 | } | ||
9389 | return true; | ||
9390 | } | ||
9391 | private bool HandleEjectGroupMemberRequest(IClientAPI sender, Packet Pack) | ||
9392 | { | ||
9393 | EjectGroupMemberRequestPacket ejectGroupMemberRequest = | ||
9394 | (EjectGroupMemberRequestPacket)Pack; | ||
9395 | |||
9396 | #region Packet Session and User Check | ||
9397 | if (m_checkPackets) | ||
9398 | { | ||
9399 | if (ejectGroupMemberRequest.AgentData.SessionID != SessionId || | ||
9400 | ejectGroupMemberRequest.AgentData.AgentID != AgentId) | ||
9401 | return true; | ||
9402 | } | ||
9403 | #endregion | ||
9404 | |||
9405 | if (m_GroupsModule != null) | ||
9406 | { | ||
9407 | foreach (EjectGroupMemberRequestPacket.EjectDataBlock e | ||
9408 | in ejectGroupMemberRequest.EjectData) | ||
9409 | { | ||
9410 | m_GroupsModule.EjectGroupMemberRequest(this, | ||
9411 | ejectGroupMemberRequest.GroupData.GroupID, | ||
9412 | e.EjecteeID); | ||
9413 | } | ||
9414 | } | ||
9415 | return true; | ||
9416 | } | ||
9417 | private bool HandleInviteGroupRequest(IClientAPI sender, Packet Pack) | ||
9418 | { | ||
9419 | InviteGroupRequestPacket inviteGroupRequest = | ||
9420 | (InviteGroupRequestPacket)Pack; | ||
9421 | |||
9422 | #region Packet Session and User Check | ||
9423 | if (m_checkPackets) | ||
9424 | { | ||
9425 | if (inviteGroupRequest.AgentData.SessionID != SessionId || | ||
9426 | inviteGroupRequest.AgentData.AgentID != AgentId) | ||
9427 | return true; | ||
9428 | } | ||
9429 | #endregion | ||
9430 | |||
9431 | if (m_GroupsModule != null) | ||
9432 | { | ||
9433 | foreach (InviteGroupRequestPacket.InviteDataBlock b in | ||
9434 | inviteGroupRequest.InviteData) | ||
9435 | { | ||
9436 | m_GroupsModule.InviteGroupRequest(this, | ||
9437 | inviteGroupRequest.GroupData.GroupID, | ||
9438 | b.InviteeID, | ||
9439 | b.RoleID); | ||
9440 | } | ||
9441 | } | ||
9442 | return true; | ||
9443 | } | ||
9444 | |||
9445 | #endregion Groups | ||
9446 | |||
9447 | private bool HandleStartLure(IClientAPI sender, Packet Pack) | ||
9448 | { | ||
9449 | StartLurePacket startLureRequest = (StartLurePacket)Pack; | ||
9450 | |||
9451 | #region Packet Session and User Check | ||
9452 | if (m_checkPackets) | ||
9453 | { | ||
9454 | if (startLureRequest.AgentData.SessionID != SessionId || | ||
9455 | startLureRequest.AgentData.AgentID != AgentId) | ||
9456 | return true; | ||
9457 | } | ||
9458 | #endregion | ||
9459 | |||
9460 | StartLure handlerStartLure = OnStartLure; | ||
9461 | if (handlerStartLure != null) | ||
9462 | handlerStartLure(startLureRequest.Info.LureType, | ||
9463 | Utils.BytesToString( | ||
9464 | startLureRequest.Info.Message), | ||
9465 | startLureRequest.TargetData[0].TargetID, | ||
9466 | this); | ||
9467 | return true; | ||
9468 | } | ||
9469 | private bool HandleTeleportLureRequest(IClientAPI sender, Packet Pack) | ||
9470 | { | ||
9471 | TeleportLureRequestPacket teleportLureRequest = | ||
9472 | (TeleportLureRequestPacket)Pack; | ||
9473 | |||
9474 | #region Packet Session and User Check | ||
9475 | if (m_checkPackets) | ||
9476 | { | ||
9477 | if (teleportLureRequest.Info.SessionID != SessionId || | ||
9478 | teleportLureRequest.Info.AgentID != AgentId) | ||
9479 | return true; | ||
9480 | } | ||
9481 | #endregion | ||
9482 | |||
9483 | TeleportLureRequest handlerTeleportLureRequest = OnTeleportLureRequest; | ||
9484 | if (handlerTeleportLureRequest != null) | ||
9485 | handlerTeleportLureRequest( | ||
9486 | teleportLureRequest.Info.LureID, | ||
9487 | teleportLureRequest.Info.TeleportFlags, | ||
9488 | this); | ||
9489 | return true; | ||
9490 | } | ||
9491 | private bool HandleClassifiedInfoRequest(IClientAPI sender, Packet Pack) | ||
9492 | { | ||
9493 | ClassifiedInfoRequestPacket classifiedInfoRequest = | ||
9494 | (ClassifiedInfoRequestPacket)Pack; | ||
9495 | |||
9496 | #region Packet Session and User Check | ||
9497 | if (m_checkPackets) | ||
9498 | { | ||
9499 | if (classifiedInfoRequest.AgentData.SessionID != SessionId || | ||
9500 | classifiedInfoRequest.AgentData.AgentID != AgentId) | ||
9501 | return true; | ||
9502 | } | ||
9503 | #endregion | ||
9504 | |||
9505 | ClassifiedInfoRequest handlerClassifiedInfoRequest = OnClassifiedInfoRequest; | ||
9506 | if (handlerClassifiedInfoRequest != null) | ||
9507 | handlerClassifiedInfoRequest( | ||
9508 | classifiedInfoRequest.Data.ClassifiedID, | ||
9509 | this); | ||
9510 | return true; | ||
9511 | } | ||
9512 | private bool HandleClassifiedInfoUpdate(IClientAPI sender, Packet Pack) | ||
9513 | { | ||
9514 | ClassifiedInfoUpdatePacket classifiedInfoUpdate = | ||
9515 | (ClassifiedInfoUpdatePacket)Pack; | ||
9516 | |||
9517 | #region Packet Session and User Check | ||
9518 | if (m_checkPackets) | ||
9519 | { | ||
9520 | if (classifiedInfoUpdate.AgentData.SessionID != SessionId || | ||
9521 | classifiedInfoUpdate.AgentData.AgentID != AgentId) | ||
9522 | return true; | ||
9523 | } | ||
9524 | #endregion | ||
9525 | |||
9526 | ClassifiedInfoUpdate handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate; | ||
9527 | if (handlerClassifiedInfoUpdate != null) | ||
9528 | handlerClassifiedInfoUpdate( | ||
9529 | classifiedInfoUpdate.Data.ClassifiedID, | ||
9530 | classifiedInfoUpdate.Data.Category, | ||
9531 | Utils.BytesToString( | ||
9532 | classifiedInfoUpdate.Data.Name), | ||
9533 | Utils.BytesToString( | ||
9534 | classifiedInfoUpdate.Data.Desc), | ||
9535 | classifiedInfoUpdate.Data.ParcelID, | ||
9536 | classifiedInfoUpdate.Data.ParentEstate, | ||
9537 | classifiedInfoUpdate.Data.SnapshotID, | ||
9538 | new Vector3( | ||
9539 | classifiedInfoUpdate.Data.PosGlobal), | ||
9540 | classifiedInfoUpdate.Data.ClassifiedFlags, | ||
9541 | classifiedInfoUpdate.Data.PriceForListing, | ||
9542 | this); | ||
9543 | return true; | ||
9544 | } | ||
9545 | private bool HandleClassifiedDelete(IClientAPI sender, Packet Pack) | ||
9546 | { | ||
9547 | ClassifiedDeletePacket classifiedDelete = | ||
9548 | (ClassifiedDeletePacket)Pack; | ||
9549 | |||
9550 | #region Packet Session and User Check | ||
9551 | if (m_checkPackets) | ||
9552 | { | ||
9553 | if (classifiedDelete.AgentData.SessionID != SessionId || | ||
9554 | classifiedDelete.AgentData.AgentID != AgentId) | ||
9555 | return true; | ||
9556 | } | ||
9557 | #endregion | ||
9558 | |||
9559 | ClassifiedDelete handlerClassifiedDelete = OnClassifiedDelete; | ||
9560 | if (handlerClassifiedDelete != null) | ||
9561 | handlerClassifiedDelete( | ||
9562 | classifiedDelete.Data.ClassifiedID, | ||
9563 | this); | ||
9564 | return true; | ||
9565 | } | ||
9566 | private bool HandleClassifiedGodDelete(IClientAPI sender, Packet Pack) | ||
9567 | { | ||
9568 | ClassifiedGodDeletePacket classifiedGodDelete = | ||
9569 | (ClassifiedGodDeletePacket)Pack; | ||
9570 | |||
9571 | #region Packet Session and User Check | ||
9572 | if (m_checkPackets) | ||
9573 | { | ||
9574 | if (classifiedGodDelete.AgentData.SessionID != SessionId || | ||
9575 | classifiedGodDelete.AgentData.AgentID != AgentId) | ||
9576 | return true; | ||
9577 | } | ||
9578 | #endregion | ||
9579 | |||
9580 | ClassifiedDelete handlerClassifiedGodDelete = OnClassifiedGodDelete; | ||
9581 | if (handlerClassifiedGodDelete != null) | ||
9582 | handlerClassifiedGodDelete( | ||
9583 | classifiedGodDelete.Data.ClassifiedID, | ||
9584 | this); | ||
9585 | return true; | ||
9586 | } | ||
9587 | private bool HandleEventGodDelete(IClientAPI sender, Packet Pack) | ||
9588 | { | ||
9589 | EventGodDeletePacket eventGodDelete = | ||
9590 | (EventGodDeletePacket)Pack; | ||
9591 | |||
9592 | #region Packet Session and User Check | ||
9593 | if (m_checkPackets) | ||
9594 | { | ||
9595 | if (eventGodDelete.AgentData.SessionID != SessionId || | ||
9596 | eventGodDelete.AgentData.AgentID != AgentId) | ||
9597 | return true; | ||
9598 | } | ||
9599 | #endregion | ||
9600 | |||
9601 | EventGodDelete handlerEventGodDelete = OnEventGodDelete; | ||
9602 | if (handlerEventGodDelete != null) | ||
9603 | handlerEventGodDelete( | ||
9604 | eventGodDelete.EventData.EventID, | ||
9605 | eventGodDelete.QueryData.QueryID, | ||
9606 | Utils.BytesToString( | ||
9607 | eventGodDelete.QueryData.QueryText), | ||
9608 | eventGodDelete.QueryData.QueryFlags, | ||
9609 | eventGodDelete.QueryData.QueryStart, | ||
9610 | this); | ||
9611 | return true; | ||
9612 | } | ||
9613 | private bool HandleEventNotificationAddRequest(IClientAPI sender, Packet Pack) | ||
9614 | { | ||
9615 | EventNotificationAddRequestPacket eventNotificationAdd = | ||
9616 | (EventNotificationAddRequestPacket)Pack; | ||
9617 | |||
9618 | #region Packet Session and User Check | ||
9619 | if (m_checkPackets) | ||
9620 | { | ||
9621 | if (eventNotificationAdd.AgentData.SessionID != SessionId || | ||
9622 | eventNotificationAdd.AgentData.AgentID != AgentId) | ||
9623 | return true; | ||
9624 | } | ||
9625 | #endregion | ||
9626 | |||
9627 | EventNotificationAddRequest handlerEventNotificationAddRequest = OnEventNotificationAddRequest; | ||
9628 | if (handlerEventNotificationAddRequest != null) | ||
9629 | handlerEventNotificationAddRequest( | ||
9630 | eventNotificationAdd.EventData.EventID, this); | ||
9631 | return true; | ||
9632 | } | ||
9633 | private bool HandleEventNotificationRemoveRequest(IClientAPI sender, Packet Pack) | ||
9634 | { | ||
9635 | EventNotificationRemoveRequestPacket eventNotificationRemove = | ||
9636 | (EventNotificationRemoveRequestPacket)Pack; | ||
9637 | |||
9638 | #region Packet Session and User Check | ||
9639 | if (m_checkPackets) | ||
9640 | { | ||
9641 | if (eventNotificationRemove.AgentData.SessionID != SessionId || | ||
9642 | eventNotificationRemove.AgentData.AgentID != AgentId) | ||
9643 | return true; | ||
9644 | } | ||
9645 | #endregion | ||
9646 | |||
9647 | EventNotificationRemoveRequest handlerEventNotificationRemoveRequest = OnEventNotificationRemoveRequest; | ||
9648 | if (handlerEventNotificationRemoveRequest != null) | ||
9649 | handlerEventNotificationRemoveRequest( | ||
9650 | eventNotificationRemove.EventData.EventID, this); | ||
9651 | return true; | ||
9652 | } | ||
9653 | private bool HandleRetrieveInstantMessages(IClientAPI sender, Packet Pack) | ||
9654 | { | ||
9655 | RetrieveInstantMessagesPacket rimpInstantMessagePack = (RetrieveInstantMessagesPacket)Pack; | ||
9656 | |||
9657 | #region Packet Session and User Check | ||
9658 | if (m_checkPackets) | ||
9659 | { | ||
9660 | if (rimpInstantMessagePack.AgentData.SessionID != SessionId || | ||
9661 | rimpInstantMessagePack.AgentData.AgentID != AgentId) | ||
9662 | return true; | ||
9663 | } | ||
9664 | #endregion | ||
9665 | |||
9666 | RetrieveInstantMessages handlerRetrieveInstantMessages = OnRetrieveInstantMessages; | ||
9667 | if (handlerRetrieveInstantMessages != null) | ||
9668 | handlerRetrieveInstantMessages(this); | ||
9669 | return true; | ||
9670 | } | ||
9671 | private bool HandlePickDelete(IClientAPI sender, Packet Pack) | ||
9672 | { | ||
9673 | PickDeletePacket pickDelete = | ||
9674 | (PickDeletePacket)Pack; | ||
9675 | |||
9676 | #region Packet Session and User Check | ||
9677 | if (m_checkPackets) | ||
9678 | { | ||
9679 | if (pickDelete.AgentData.SessionID != SessionId || | ||
9680 | pickDelete.AgentData.AgentID != AgentId) | ||
9681 | return true; | ||
9682 | } | ||
9683 | #endregion | ||
9684 | |||
9685 | PickDelete handlerPickDelete = OnPickDelete; | ||
9686 | if (handlerPickDelete != null) | ||
9687 | handlerPickDelete(this, pickDelete.Data.PickID); | ||
9688 | return true; | ||
9689 | } | ||
9690 | private bool HandlePickGodDelete(IClientAPI sender, Packet Pack) | ||
9691 | { | ||
9692 | PickGodDeletePacket pickGodDelete = | ||
9693 | (PickGodDeletePacket)Pack; | ||
9694 | |||
9695 | #region Packet Session and User Check | ||
9696 | if (m_checkPackets) | ||
9697 | { | ||
9698 | if (pickGodDelete.AgentData.SessionID != SessionId || | ||
9699 | pickGodDelete.AgentData.AgentID != AgentId) | ||
9700 | return true; | ||
9701 | } | ||
9702 | #endregion | ||
9703 | |||
9704 | PickGodDelete handlerPickGodDelete = OnPickGodDelete; | ||
9705 | if (handlerPickGodDelete != null) | ||
9706 | handlerPickGodDelete(this, | ||
9707 | pickGodDelete.AgentData.AgentID, | ||
9708 | pickGodDelete.Data.PickID, | ||
9709 | pickGodDelete.Data.QueryID); | ||
9710 | return true; | ||
9711 | } | ||
9712 | private bool HandlePickInfoUpdate(IClientAPI sender, Packet Pack) | ||
9713 | { | ||
9714 | PickInfoUpdatePacket pickInfoUpdate = | ||
9715 | (PickInfoUpdatePacket)Pack; | ||
9716 | |||
9717 | #region Packet Session and User Check | ||
9718 | if (m_checkPackets) | ||
9719 | { | ||
9720 | if (pickInfoUpdate.AgentData.SessionID != SessionId || | ||
9721 | pickInfoUpdate.AgentData.AgentID != AgentId) | ||
9722 | return true; | ||
9723 | } | ||
9724 | #endregion | ||
9725 | |||
9726 | PickInfoUpdate handlerPickInfoUpdate = OnPickInfoUpdate; | ||
9727 | if (handlerPickInfoUpdate != null) | ||
9728 | handlerPickInfoUpdate(this, | ||
9729 | pickInfoUpdate.Data.PickID, | ||
9730 | pickInfoUpdate.Data.CreatorID, | ||
9731 | pickInfoUpdate.Data.TopPick, | ||
9732 | Utils.BytesToString(pickInfoUpdate.Data.Name), | ||
9733 | Utils.BytesToString(pickInfoUpdate.Data.Desc), | ||
9734 | pickInfoUpdate.Data.SnapshotID, | ||
9735 | pickInfoUpdate.Data.SortOrder, | ||
9736 | pickInfoUpdate.Data.Enabled); | ||
9737 | return true; | ||
9738 | } | ||
9739 | private bool HandleAvatarNotesUpdate(IClientAPI sender, Packet Pack) | ||
9740 | { | ||
9741 | AvatarNotesUpdatePacket avatarNotesUpdate = | ||
9742 | (AvatarNotesUpdatePacket)Pack; | ||
9743 | |||
9744 | #region Packet Session and User Check | ||
9745 | if (m_checkPackets) | ||
9746 | { | ||
9747 | if (avatarNotesUpdate.AgentData.SessionID != SessionId || | ||
9748 | avatarNotesUpdate.AgentData.AgentID != AgentId) | ||
9749 | return true; | ||
9750 | } | ||
9751 | #endregion | ||
9752 | |||
9753 | AvatarNotesUpdate handlerAvatarNotesUpdate = OnAvatarNotesUpdate; | ||
9754 | if (handlerAvatarNotesUpdate != null) | ||
9755 | handlerAvatarNotesUpdate(this, | ||
9756 | avatarNotesUpdate.Data.TargetID, | ||
9757 | Utils.BytesToString(avatarNotesUpdate.Data.Notes)); | ||
9758 | return true; | ||
9759 | } | ||
9760 | private bool HandleAvatarInterestsUpdate(IClientAPI sender, Packet Pack) | ||
9761 | { | ||
9762 | AvatarInterestsUpdatePacket avatarInterestUpdate = | ||
9763 | (AvatarInterestsUpdatePacket)Pack; | ||
9764 | |||
9765 | #region Packet Session and User Check | ||
9766 | if (m_checkPackets) | ||
9767 | { | ||
9768 | if (avatarInterestUpdate.AgentData.SessionID != SessionId || | ||
9769 | avatarInterestUpdate.AgentData.AgentID != AgentId) | ||
9770 | return true; | ||
9771 | } | ||
9772 | #endregion | ||
9773 | |||
9774 | AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate; | ||
9775 | if (handlerAvatarInterestUpdate != null) | ||
9776 | handlerAvatarInterestUpdate(this, | ||
9777 | avatarInterestUpdate.PropertiesData.WantToMask, | ||
9778 | Utils.BytesToString(avatarInterestUpdate.PropertiesData.WantToText), | ||
9779 | avatarInterestUpdate.PropertiesData.SkillsMask, | ||
9780 | Utils.BytesToString(avatarInterestUpdate.PropertiesData.SkillsText), | ||
9781 | Utils.BytesToString(avatarInterestUpdate.PropertiesData.LanguagesText)); | ||
9782 | return true; | ||
9783 | } | ||
9784 | private bool HandleGrantUserRights(IClientAPI sender, Packet Pack) | ||
9785 | { | ||
9786 | GrantUserRightsPacket GrantUserRights = | ||
9787 | (GrantUserRightsPacket)Pack; | ||
9788 | #region Packet Session and User Check | ||
9789 | if (m_checkPackets) | ||
9790 | { | ||
9791 | if (GrantUserRights.AgentData.SessionID != SessionId || | ||
9792 | GrantUserRights.AgentData.AgentID != AgentId) | ||
9793 | return true; | ||
9794 | } | ||
9795 | #endregion | ||
9796 | GrantUserFriendRights GrantUserRightsHandler = OnGrantUserRights; | ||
9797 | if (GrantUserRightsHandler != null) | ||
9798 | GrantUserRightsHandler(this, | ||
9799 | GrantUserRights.AgentData.AgentID, | ||
9800 | GrantUserRights.Rights[0].AgentRelated, | ||
9801 | GrantUserRights.Rights[0].RelatedRights); | ||
9802 | return true; | ||
9803 | } | ||
9804 | private bool HandlePlacesQuery(IClientAPI sender, Packet Pack) | ||
9805 | { | ||
9806 | PlacesQueryPacket placesQueryPacket = | ||
9807 | (PlacesQueryPacket)Pack; | ||
9808 | |||
9809 | PlacesQuery handlerPlacesQuery = OnPlacesQuery; | ||
9810 | |||
9811 | if (handlerPlacesQuery != null) | ||
9812 | handlerPlacesQuery(placesQueryPacket.AgentData.QueryID, | ||
9813 | placesQueryPacket.TransactionData.TransactionID, | ||
9814 | Utils.BytesToString( | ||
9815 | placesQueryPacket.QueryData.QueryText), | ||
9816 | placesQueryPacket.QueryData.QueryFlags, | ||
9817 | (byte)placesQueryPacket.QueryData.Category, | ||
9818 | Utils.BytesToString( | ||
9819 | placesQueryPacket.QueryData.SimName), | ||
9820 | this); | ||
9821 | return true; | ||
9822 | } | ||
5246 | 9823 | ||
5247 | #endregion Packet Handlers | 9824 | #endregion Packet Handlers |
5248 | 9825 | ||
@@ -5732,15 +10309,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5732 | 10309 | ||
5733 | if (ProcessPacketMethod(Pack)) | 10310 | if (ProcessPacketMethod(Pack)) |
5734 | { | 10311 | { |
10312 | PacketPool.Instance.ReturnPacket(Pack); | ||
5735 | return; | 10313 | return; |
5736 | } | 10314 | } |
5737 | 10315 | ||
5738 | // Main packet processing conditional | 10316 | // Main packet processing conditional |
5739 | switch (Pack.Type) | 10317 | switch (Pack.Type) |
5740 | { | 10318 | { |
5741 | #region Scene/Avatar | ||
5742 | #region CommentedOut | 10319 | #region CommentedOut |
5743 | /* | 10320 | /* |
10321 | #region Scene/Avatar | ||
10322 | |||
10323 | |||
5744 | case PacketType.AvatarPropertiesRequest: | 10324 | case PacketType.AvatarPropertiesRequest: |
5745 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; | 10325 | AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; |
5746 | 10326 | ||
@@ -6402,8 +10982,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6402 | 10982 | ||
6403 | } | 10983 | } |
6404 | break; | 10984 | break; |
6405 | */ | 10985 | |
6406 | #endregion | ||
6407 | case PacketType.AvatarPickerRequest: | 10986 | case PacketType.AvatarPickerRequest: |
6408 | AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; | 10987 | AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; |
6409 | 10988 | ||
@@ -6427,7 +11006,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6427 | Utils.BytesToString(querydata.Name)); | 11006 | Utils.BytesToString(querydata.Name)); |
6428 | } | 11007 | } |
6429 | break; | 11008 | break; |
6430 | 11009 | ||
6431 | case PacketType.AgentDataUpdateRequest: | 11010 | case PacketType.AgentDataUpdateRequest: |
6432 | AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; | 11011 | AgentDataUpdateRequestPacket avRequestDataUpdatePacket = (AgentDataUpdateRequestPacket)Pack; |
6433 | 11012 | ||
@@ -6547,7 +11126,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6547 | 11126 | ||
6548 | #endregion | 11127 | #endregion |
6549 | 11128 | ||
6550 | #region Objects/m_sceneObjects | 11129 | |
11130 | //#region Objects/m_sceneObjects | ||
6551 | 11131 | ||
6552 | case PacketType.ObjectLink: | 11132 | case PacketType.ObjectLink: |
6553 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; | 11133 | ObjectLinkPacket link = (ObjectLinkPacket)Pack; |
@@ -6706,6 +11286,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6706 | } | 11286 | } |
6707 | } | 11287 | } |
6708 | break; | 11288 | break; |
11289 | |||
6709 | case PacketType.ObjectDuplicate: | 11290 | case PacketType.ObjectDuplicate: |
6710 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; | 11291 | ObjectDuplicatePacket dupe = (ObjectDuplicatePacket)Pack; |
6711 | 11292 | ||
@@ -6758,6 +11339,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6758 | } | 11339 | } |
6759 | } | 11340 | } |
6760 | break; | 11341 | break; |
11342 | |||
6761 | case PacketType.ObjectSelect: | 11343 | case PacketType.ObjectSelect: |
6762 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; | 11344 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; |
6763 | 11345 | ||
@@ -6781,6 +11363,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6781 | } | 11363 | } |
6782 | } | 11364 | } |
6783 | break; | 11365 | break; |
11366 | |||
6784 | case PacketType.ObjectDeselect: | 11367 | case PacketType.ObjectDeselect: |
6785 | ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; | 11368 | ObjectDeselectPacket incomingdeselect = (ObjectDeselectPacket)Pack; |
6786 | 11369 | ||
@@ -6804,6 +11387,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6804 | } | 11387 | } |
6805 | } | 11388 | } |
6806 | break; | 11389 | break; |
11390 | |||
6807 | case PacketType.ObjectPosition: | 11391 | case PacketType.ObjectPosition: |
6808 | // DEPRECATED: but till libsecondlife removes it, people will use it | 11392 | // DEPRECATED: but till libsecondlife removes it, people will use it |
6809 | ObjectPositionPacket position = (ObjectPositionPacket)Pack; | 11393 | ObjectPositionPacket position = (ObjectPositionPacket)Pack; |
@@ -6826,6 +11410,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6826 | } | 11410 | } |
6827 | 11411 | ||
6828 | break; | 11412 | break; |
11413 | |||
6829 | case PacketType.ObjectScale: | 11414 | case PacketType.ObjectScale: |
6830 | // DEPRECATED: but till libsecondlife removes it, people will use it | 11415 | // DEPRECATED: but till libsecondlife removes it, people will use it |
6831 | ObjectScalePacket scale = (ObjectScalePacket)Pack; | 11416 | ObjectScalePacket scale = (ObjectScalePacket)Pack; |
@@ -6847,6 +11432,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6847 | } | 11432 | } |
6848 | 11433 | ||
6849 | break; | 11434 | break; |
11435 | |||
6850 | case PacketType.ObjectRotation: | 11436 | case PacketType.ObjectRotation: |
6851 | // DEPRECATED: but till libsecondlife removes it, people will use it | 11437 | // DEPRECATED: but till libsecondlife removes it, people will use it |
6852 | ObjectRotationPacket rotation = (ObjectRotationPacket)Pack; | 11438 | ObjectRotationPacket rotation = (ObjectRotationPacket)Pack; |
@@ -6868,6 +11454,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6868 | } | 11454 | } |
6869 | 11455 | ||
6870 | break; | 11456 | break; |
11457 | |||
6871 | case PacketType.ObjectFlagUpdate: | 11458 | case PacketType.ObjectFlagUpdate: |
6872 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; | 11459 | ObjectFlagUpdatePacket flags = (ObjectFlagUpdatePacket)Pack; |
6873 | 11460 | ||
@@ -6908,6 +11495,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6908 | } | 11495 | } |
6909 | } | 11496 | } |
6910 | break; | 11497 | break; |
11498 | |||
6911 | case PacketType.ObjectGrab: | 11499 | case PacketType.ObjectGrab: |
6912 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; | 11500 | ObjectGrabPacket grab = (ObjectGrabPacket)Pack; |
6913 | 11501 | ||
@@ -6942,6 +11530,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6942 | handlerGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this, touchArgs); | 11530 | handlerGrabObject(grab.ObjectData.LocalID, grab.ObjectData.GrabOffset, this, touchArgs); |
6943 | } | 11531 | } |
6944 | break; | 11532 | break; |
11533 | |||
6945 | case PacketType.ObjectGrabUpdate: | 11534 | case PacketType.ObjectGrabUpdate: |
6946 | ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; | 11535 | ObjectGrabUpdatePacket grabUpdate = (ObjectGrabUpdatePacket)Pack; |
6947 | 11536 | ||
@@ -6977,6 +11566,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
6977 | grabUpdate.ObjectData.GrabPosition, this, touchArgs); | 11566 | grabUpdate.ObjectData.GrabPosition, this, touchArgs); |
6978 | } | 11567 | } |
6979 | break; | 11568 | break; |
11569 | |||
6980 | case PacketType.ObjectDeGrab: | 11570 | case PacketType.ObjectDeGrab: |
6981 | ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; | 11571 | ObjectDeGrabPacket deGrab = (ObjectDeGrabPacket)Pack; |
6982 | 11572 | ||
@@ -7010,6 +11600,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7010 | handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs); | 11600 | handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs); |
7011 | } | 11601 | } |
7012 | break; | 11602 | break; |
11603 | |||
7013 | case PacketType.ObjectSpinStart: | 11604 | case PacketType.ObjectSpinStart: |
7014 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet"); | 11605 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStart packet"); |
7015 | ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; | 11606 | ObjectSpinStartPacket spinStart = (ObjectSpinStartPacket)Pack; |
@@ -7053,6 +11644,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7053 | handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this); | 11644 | handlerSpinUpdate(spinUpdate.ObjectData.ObjectID, spinUpdate.ObjectData.Rotation, this); |
7054 | } | 11645 | } |
7055 | break; | 11646 | break; |
11647 | |||
11648 | |||
7056 | case PacketType.ObjectSpinStop: | 11649 | case PacketType.ObjectSpinStop: |
7057 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); | 11650 | //m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); |
7058 | ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; | 11651 | ObjectSpinStopPacket spinStop = (ObjectSpinStopPacket)Pack; |
@@ -7097,6 +11690,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7097 | } | 11690 | } |
7098 | } | 11691 | } |
7099 | break; | 11692 | break; |
11693 | |||
7100 | case PacketType.ObjectName: | 11694 | case PacketType.ObjectName: |
7101 | ObjectNamePacket objName = (ObjectNamePacket)Pack; | 11695 | ObjectNamePacket objName = (ObjectNamePacket)Pack; |
7102 | 11696 | ||
@@ -7120,6 +11714,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7120 | } | 11714 | } |
7121 | } | 11715 | } |
7122 | break; | 11716 | break; |
11717 | |||
7123 | case PacketType.ObjectPermissions: | 11718 | case PacketType.ObjectPermissions: |
7124 | if (OnObjectPermissions != null) | 11719 | if (OnObjectPermissions != null) |
7125 | { | 11720 | { |
@@ -7195,6 +11790,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7195 | } | 11790 | } |
7196 | } | 11791 | } |
7197 | break; | 11792 | break; |
11793 | |||
7198 | case PacketType.ObjectDuplicateOnRay: | 11794 | case PacketType.ObjectDuplicateOnRay: |
7199 | ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack; | 11795 | ObjectDuplicateOnRayPacket dupeOnRay = (ObjectDuplicateOnRayPacket)Pack; |
7200 | 11796 | ||
@@ -7222,6 +11818,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7222 | } | 11818 | } |
7223 | 11819 | ||
7224 | break; | 11820 | break; |
11821 | |||
7225 | case PacketType.RequestObjectPropertiesFamily: | 11822 | case PacketType.RequestObjectPropertiesFamily: |
7226 | //This powers the little tooltip that appears when you move your mouse over an object | 11823 | //This powers the little tooltip that appears when you move your mouse over an object |
7227 | RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; | 11824 | RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; |
@@ -7246,6 +11843,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7246 | } | 11843 | } |
7247 | 11844 | ||
7248 | break; | 11845 | break; |
11846 | |||
7249 | case PacketType.ObjectIncludeInSearch: | 11847 | case PacketType.ObjectIncludeInSearch: |
7250 | //This lets us set objects to appear in search (stuff like DataSnapshot, etc) | 11848 | //This lets us set objects to appear in search (stuff like DataSnapshot, etc) |
7251 | ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack; | 11849 | ObjectIncludeInSearchPacket packInSearch = (ObjectIncludeInSearchPacket)Pack; |
@@ -7341,9 +11939,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7341 | } | 11939 | } |
7342 | break; | 11940 | break; |
7343 | 11941 | ||
7344 | #endregion | 11942 | //#endregion |
7345 | 11943 | ||
7346 | #region Inventory/Asset/Other related packets | 11944 | //#region Inventory/Asset/Other related packets |
7347 | 11945 | ||
7348 | case PacketType.RequestImage: | 11946 | case PacketType.RequestImage: |
7349 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; | 11947 | RequestImagePacket imageRequest = (RequestImagePacket)Pack; |
@@ -7477,12 +12075,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7477 | 12075 | ||
7478 | MakeAssetRequest(transfer, taskID); | 12076 | MakeAssetRequest(transfer, taskID); |
7479 | 12077 | ||
7480 | /* RequestAsset = OnRequestAsset; | 12078 | // RequestAsset = OnRequestAsset; |
7481 | if (RequestAsset != null) | 12079 | // if (RequestAsset != null) |
7482 | { | 12080 | // { |
7483 | RequestAsset(this, transfer); | 12081 | // RequestAsset(this, transfer); |
7484 | }*/ | 12082 | // } |
12083 | |||
7485 | break; | 12084 | break; |
12085 | |||
7486 | case PacketType.AssetUploadRequest: | 12086 | case PacketType.AssetUploadRequest: |
7487 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; | 12087 | AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; |
7488 | 12088 | ||
@@ -7501,6 +12101,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7501 | request.AssetBlock.Tempfile); | 12101 | request.AssetBlock.Tempfile); |
7502 | } | 12102 | } |
7503 | break; | 12103 | break; |
12104 | |||
7504 | case PacketType.RequestXfer: | 12105 | case PacketType.RequestXfer: |
7505 | RequestXferPacket xferReq = (RequestXferPacket)Pack; | 12106 | RequestXferPacket xferReq = (RequestXferPacket)Pack; |
7506 | 12107 | ||
@@ -7511,6 +12112,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7511 | handlerRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename)); | 12112 | handlerRequestXfer(this, xferReq.XferID.ID, Util.FieldToString(xferReq.XferID.Filename)); |
7512 | } | 12113 | } |
7513 | break; | 12114 | break; |
12115 | |||
7514 | case PacketType.SendXferPacket: | 12116 | case PacketType.SendXferPacket: |
7515 | SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack; | 12117 | SendXferPacketPacket xferRec = (SendXferPacketPacket)Pack; |
7516 | 12118 | ||
@@ -7520,6 +12122,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7520 | handlerXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data); | 12122 | handlerXferReceive(this, xferRec.XferID.ID, xferRec.XferID.Packet, xferRec.DataPacket.Data); |
7521 | } | 12123 | } |
7522 | break; | 12124 | break; |
12125 | |||
7523 | case PacketType.ConfirmXferPacket: | 12126 | case PacketType.ConfirmXferPacket: |
7524 | ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack; | 12127 | ConfirmXferPacketPacket confirmXfer = (ConfirmXferPacketPacket)Pack; |
7525 | 12128 | ||
@@ -7529,6 +12132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7529 | handlerConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); | 12132 | handlerConfirmXfer(this, confirmXfer.XferID.ID, confirmXfer.XferID.Packet); |
7530 | } | 12133 | } |
7531 | break; | 12134 | break; |
12135 | |||
7532 | case PacketType.AbortXfer: | 12136 | case PacketType.AbortXfer: |
7533 | AbortXferPacket abortXfer = (AbortXferPacket)Pack; | 12137 | AbortXferPacket abortXfer = (AbortXferPacket)Pack; |
7534 | AbortXfer handlerAbortXfer = OnAbortXfer; | 12138 | AbortXfer handlerAbortXfer = OnAbortXfer; |
@@ -7538,6 +12142,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7538 | } | 12142 | } |
7539 | 12143 | ||
7540 | break; | 12144 | break; |
12145 | |||
7541 | case PacketType.CreateInventoryFolder: | 12146 | case PacketType.CreateInventoryFolder: |
7542 | CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; | 12147 | CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack; |
7543 | 12148 | ||
@@ -7559,6 +12164,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7559 | invFolder.FolderData.ParentID); | 12164 | invFolder.FolderData.ParentID); |
7560 | } | 12165 | } |
7561 | break; | 12166 | break; |
12167 | |||
7562 | case PacketType.UpdateInventoryFolder: | 12168 | case PacketType.UpdateInventoryFolder: |
7563 | if (OnUpdateInventoryFolder != null) | 12169 | if (OnUpdateInventoryFolder != null) |
7564 | { | 12170 | { |
@@ -7588,6 +12194,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7588 | } | 12194 | } |
7589 | } | 12195 | } |
7590 | break; | 12196 | break; |
12197 | |||
7591 | case PacketType.MoveInventoryFolder: | 12198 | case PacketType.MoveInventoryFolder: |
7592 | if (OnMoveInventoryFolder != null) | 12199 | if (OnMoveInventoryFolder != null) |
7593 | { | 12200 | { |
@@ -7615,6 +12222,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7615 | } | 12222 | } |
7616 | } | 12223 | } |
7617 | break; | 12224 | break; |
12225 | |||
7618 | case PacketType.CreateInventoryItem: | 12226 | case PacketType.CreateInventoryItem: |
7619 | CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; | 12227 | CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack; |
7620 | 12228 | ||
@@ -7642,6 +12250,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7642 | Util.UnixTimeSinceEpoch()); | 12250 | Util.UnixTimeSinceEpoch()); |
7643 | } | 12251 | } |
7644 | break; | 12252 | break; |
12253 | |||
7645 | case PacketType.FetchInventory: | 12254 | case PacketType.FetchInventory: |
7646 | if (OnFetchInventory != null) | 12255 | if (OnFetchInventory != null) |
7647 | { | 12256 | { |
@@ -7670,6 +12279,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7670 | } | 12279 | } |
7671 | } | 12280 | } |
7672 | break; | 12281 | break; |
12282 | |||
7673 | case PacketType.FetchInventoryDescendents: | 12283 | case PacketType.FetchInventoryDescendents: |
7674 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; | 12284 | FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack; |
7675 | 12285 | ||
@@ -7690,6 +12300,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7690 | Fetch.InventoryData.SortOrder); | 12300 | Fetch.InventoryData.SortOrder); |
7691 | } | 12301 | } |
7692 | break; | 12302 | break; |
12303 | |||
7693 | case PacketType.PurgeInventoryDescendents: | 12304 | case PacketType.PurgeInventoryDescendents: |
7694 | PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; | 12305 | PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; |
7695 | 12306 | ||
@@ -7708,6 +12319,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7708 | handlerPurgeInventoryDescendents(this, Purge.InventoryData.FolderID); | 12319 | handlerPurgeInventoryDescendents(this, Purge.InventoryData.FolderID); |
7709 | } | 12320 | } |
7710 | break; | 12321 | break; |
12322 | |||
7711 | case PacketType.UpdateInventoryItem: | 12323 | case PacketType.UpdateInventoryItem: |
7712 | UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack; | 12324 | UpdateInventoryItemPacket inventoryItemUpdate = (UpdateInventoryItemPacket)Pack; |
7713 | 12325 | ||
@@ -7752,6 +12364,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7752 | } | 12364 | } |
7753 | } | 12365 | } |
7754 | break; | 12366 | break; |
12367 | |||
7755 | case PacketType.CopyInventoryItem: | 12368 | case PacketType.CopyInventoryItem: |
7756 | CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack; | 12369 | CopyInventoryItemPacket copyitem = (CopyInventoryItemPacket)Pack; |
7757 | 12370 | ||
@@ -7779,6 +12392,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7779 | } | 12392 | } |
7780 | } | 12393 | } |
7781 | break; | 12394 | break; |
12395 | |||
7782 | case PacketType.MoveInventoryItem: | 12396 | case PacketType.MoveInventoryItem: |
7783 | MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; | 12397 | MoveInventoryItemPacket moveitem = (MoveInventoryItemPacket)Pack; |
7784 | 12398 | ||
@@ -7812,6 +12426,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7812 | } | 12426 | } |
7813 | } | 12427 | } |
7814 | break; | 12428 | break; |
12429 | |||
7815 | case PacketType.RemoveInventoryItem: | 12430 | case PacketType.RemoveInventoryItem: |
7816 | RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack; | 12431 | RemoveInventoryItemPacket removeItem = (RemoveInventoryItemPacket)Pack; |
7817 | 12432 | ||
@@ -7840,6 +12455,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7840 | 12455 | ||
7841 | } | 12456 | } |
7842 | break; | 12457 | break; |
12458 | |||
7843 | case PacketType.RemoveInventoryFolder: | 12459 | case PacketType.RemoveInventoryFolder: |
7844 | RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack; | 12460 | RemoveInventoryFolderPacket removeFolder = (RemoveInventoryFolderPacket)Pack; |
7845 | 12461 | ||
@@ -7867,6 +12483,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7867 | } | 12483 | } |
7868 | } | 12484 | } |
7869 | break; | 12485 | break; |
12486 | |||
7870 | case PacketType.RemoveInventoryObjects: | 12487 | case PacketType.RemoveInventoryObjects: |
7871 | RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack; | 12488 | RemoveInventoryObjectsPacket removeObject = (RemoveInventoryObjectsPacket)Pack; |
7872 | #region Packet Session and User Check | 12489 | #region Packet Session and User Check |
@@ -7907,6 +12524,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7907 | } | 12524 | } |
7908 | } | 12525 | } |
7909 | break; | 12526 | break; |
12527 | |||
7910 | case PacketType.RequestTaskInventory: | 12528 | case PacketType.RequestTaskInventory: |
7911 | RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; | 12529 | RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack; |
7912 | 12530 | ||
@@ -7925,6 +12543,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7925 | handlerRequestTaskInventory(this, requesttask.InventoryData.LocalID); | 12543 | handlerRequestTaskInventory(this, requesttask.InventoryData.LocalID); |
7926 | } | 12544 | } |
7927 | break; | 12545 | break; |
12546 | |||
7928 | case PacketType.UpdateTaskInventory: | 12547 | case PacketType.UpdateTaskInventory: |
7929 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; | 12548 | UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; |
7930 | 12549 | ||
@@ -8102,6 +12721,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8102 | handlerMapNameRequest(this, mapName); | 12721 | handlerMapNameRequest(this, mapName); |
8103 | } | 12722 | } |
8104 | break; | 12723 | break; |
12724 | |||
8105 | case PacketType.TeleportLandmarkRequest: | 12725 | case PacketType.TeleportLandmarkRequest: |
8106 | TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; | 12726 | TeleportLandmarkRequestPacket tpReq = (TeleportLandmarkRequestPacket)Pack; |
8107 | 12727 | ||
@@ -8172,7 +12792,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8172 | 12792 | ||
8173 | } | 12793 | } |
8174 | break; | 12794 | break; |
8175 | 12795 | ||
8176 | case PacketType.TeleportLocationRequest: | 12796 | case PacketType.TeleportLocationRequest: |
8177 | TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; | 12797 | TeleportLocationRequestPacket tpLocReq = (TeleportLocationRequestPacket)Pack; |
8178 | // m_log.Debug(tpLocReq.ToString()); | 12798 | // m_log.Debug(tpLocReq.ToString()); |
@@ -8202,7 +12822,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8202 | } | 12822 | } |
8203 | break; | 12823 | break; |
8204 | 12824 | ||
8205 | #endregion | 12825 | //#endregion |
8206 | 12826 | ||
8207 | case PacketType.UUIDNameRequest: | 12827 | case PacketType.UUIDNameRequest: |
8208 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; | 12828 | UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; |
@@ -8217,7 +12837,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8217 | } | 12837 | } |
8218 | break; | 12838 | break; |
8219 | 12839 | ||
8220 | #region Parcel related packets | 12840 | //#region Parcel related packets |
12841 | |||
8221 | 12842 | ||
8222 | case PacketType.RegionHandleRequest: | 12843 | case PacketType.RegionHandleRequest: |
8223 | RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; | 12844 | RegionHandleRequestPacket rhrPack = (RegionHandleRequestPacket)Pack; |
@@ -8300,6 +12921,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8300 | updatePacket.Data.LocalID, entries, this); | 12921 | updatePacket.Data.LocalID, entries, this); |
8301 | } | 12922 | } |
8302 | break; | 12923 | break; |
12924 | |||
8303 | case PacketType.ParcelPropertiesRequest: | 12925 | case PacketType.ParcelPropertiesRequest: |
8304 | 12926 | ||
8305 | ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; | 12927 | ParcelPropertiesRequestPacket propertiesRequest = (ParcelPropertiesRequestPacket)Pack; |
@@ -8324,6 +12946,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8324 | propertiesRequest.ParcelData.SnapSelection, this); | 12946 | propertiesRequest.ParcelData.SnapSelection, this); |
8325 | } | 12947 | } |
8326 | break; | 12948 | break; |
12949 | |||
8327 | case PacketType.ParcelDivide: | 12950 | case PacketType.ParcelDivide: |
8328 | ParcelDividePacket landDivide = (ParcelDividePacket)Pack; | 12951 | ParcelDividePacket landDivide = (ParcelDividePacket)Pack; |
8329 | 12952 | ||
@@ -8345,6 +12968,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8345 | (int)Math.Round(landDivide.ParcelData.North), this); | 12968 | (int)Math.Round(landDivide.ParcelData.North), this); |
8346 | } | 12969 | } |
8347 | break; | 12970 | break; |
12971 | |||
8348 | case PacketType.ParcelJoin: | 12972 | case PacketType.ParcelJoin: |
8349 | ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; | 12973 | ParcelJoinPacket landJoin = (ParcelJoinPacket)Pack; |
8350 | 12974 | ||
@@ -8367,6 +12991,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8367 | (int)Math.Round(landJoin.ParcelData.North), this); | 12991 | (int)Math.Round(landJoin.ParcelData.North), this); |
8368 | } | 12992 | } |
8369 | break; | 12993 | break; |
12994 | |||
8370 | case PacketType.ParcelPropertiesUpdate: | 12995 | case PacketType.ParcelPropertiesUpdate: |
8371 | ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack; | 12996 | ParcelPropertiesUpdatePacket parcelPropertiesPacket = (ParcelPropertiesUpdatePacket)Pack; |
8372 | 12997 | ||
@@ -8405,6 +13030,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8405 | handlerParcelPropertiesUpdateRequest(args, parcelPropertiesPacket.ParcelData.LocalID, this); | 13030 | handlerParcelPropertiesUpdateRequest(args, parcelPropertiesPacket.ParcelData.LocalID, this); |
8406 | } | 13031 | } |
8407 | break; | 13032 | break; |
13033 | |||
8408 | case PacketType.ParcelSelectObjects: | 13034 | case PacketType.ParcelSelectObjects: |
8409 | ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; | 13035 | ParcelSelectObjectsPacket selectPacket = (ParcelSelectObjectsPacket)Pack; |
8410 | 13036 | ||
@@ -8433,6 +13059,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8433 | Convert.ToInt32(selectPacket.ParcelData.ReturnType), returnIDs, this); | 13059 | Convert.ToInt32(selectPacket.ParcelData.ReturnType), returnIDs, this); |
8434 | } | 13060 | } |
8435 | break; | 13061 | break; |
13062 | |||
8436 | case PacketType.ParcelObjectOwnersRequest: | 13063 | case PacketType.ParcelObjectOwnersRequest: |
8437 | //m_log.Debug(Pack.ToString()); | 13064 | //m_log.Debug(Pack.ToString()); |
8438 | ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; | 13065 | ParcelObjectOwnersRequestPacket reqPacket = (ParcelObjectOwnersRequestPacket)Pack; |
@@ -8453,6 +13080,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8453 | handlerParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this); | 13080 | handlerParcelObjectOwnerRequest(reqPacket.ParcelData.LocalID, this); |
8454 | } | 13081 | } |
8455 | break; | 13082 | break; |
13083 | |||
8456 | case PacketType.ParcelGodForceOwner: | 13084 | case PacketType.ParcelGodForceOwner: |
8457 | ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack; | 13085 | ParcelGodForceOwnerPacket godForceOwnerPacket = (ParcelGodForceOwnerPacket)Pack; |
8458 | 13086 | ||
@@ -8471,6 +13099,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8471 | handlerParcelGodForceOwner(godForceOwnerPacket.Data.LocalID, godForceOwnerPacket.Data.OwnerID, this); | 13099 | handlerParcelGodForceOwner(godForceOwnerPacket.Data.LocalID, godForceOwnerPacket.Data.OwnerID, this); |
8472 | } | 13100 | } |
8473 | break; | 13101 | break; |
13102 | |||
8474 | case PacketType.ParcelRelease: | 13103 | case PacketType.ParcelRelease: |
8475 | ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; | 13104 | ParcelReleasePacket releasePacket = (ParcelReleasePacket)Pack; |
8476 | 13105 | ||
@@ -8489,6 +13118,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8489 | handlerParcelAbandonRequest(releasePacket.Data.LocalID, this); | 13118 | handlerParcelAbandonRequest(releasePacket.Data.LocalID, this); |
8490 | } | 13119 | } |
8491 | break; | 13120 | break; |
13121 | |||
8492 | case PacketType.ParcelReclaim: | 13122 | case PacketType.ParcelReclaim: |
8493 | ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack; | 13123 | ParcelReclaimPacket reclaimPacket = (ParcelReclaimPacket)Pack; |
8494 | 13124 | ||
@@ -8507,6 +13137,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8507 | handlerParcelReclaim(reclaimPacket.Data.LocalID, this); | 13137 | handlerParcelReclaim(reclaimPacket.Data.LocalID, this); |
8508 | } | 13138 | } |
8509 | break; | 13139 | break; |
13140 | |||
8510 | case PacketType.ParcelReturnObjects: | 13141 | case PacketType.ParcelReturnObjects: |
8511 | 13142 | ||
8512 | 13143 | ||
@@ -8598,9 +13229,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8598 | } | 13229 | } |
8599 | break; | 13230 | break; |
8600 | 13231 | ||
8601 | #endregion | 13232 | //#endregion |
8602 | 13233 | ||
8603 | #region Estate Packets | 13234 | //#region Estate Packets |
8604 | 13235 | ||
8605 | case PacketType.EstateOwnerMessage: | 13236 | case PacketType.EstateOwnerMessage: |
8606 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; | 13237 | EstateOwnerMessagePacket messagePacket = (EstateOwnerMessagePacket)Pack; |
@@ -8918,6 +13549,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8918 | handlerRegionInfoRequest(this); | 13549 | handlerRegionInfoRequest(this); |
8919 | } | 13550 | } |
8920 | break; | 13551 | break; |
13552 | |||
8921 | case PacketType.EstateCovenantRequest: | 13553 | case PacketType.EstateCovenantRequest: |
8922 | 13554 | ||
8923 | //EstateCovenantRequestPacket.AgentDataBlock epack = | 13555 | //EstateCovenantRequestPacket.AgentDataBlock epack = |
@@ -8930,9 +13562,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8930 | } | 13562 | } |
8931 | break; | 13563 | break; |
8932 | 13564 | ||
8933 | #endregion | 13565 | //#endregion |
8934 | 13566 | ||
8935 | #region GodPackets | 13567 | //#region GodPackets |
8936 | 13568 | ||
8937 | case PacketType.RequestGodlikePowers: | 13569 | case PacketType.RequestGodlikePowers: |
8938 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; | 13570 | RequestGodlikePowersPacket rglpPack = (RequestGodlikePowersPacket)Pack; |
@@ -8949,6 +13581,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8949 | } | 13581 | } |
8950 | 13582 | ||
8951 | break; | 13583 | break; |
13584 | |||
8952 | case PacketType.GodKickUser: | 13585 | case PacketType.GodKickUser: |
8953 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | 13586 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; |
8954 | 13587 | ||
@@ -8978,9 +13611,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8978 | //OutPacket(kupack, ThrottleOutPacketType.Task); | 13611 | //OutPacket(kupack, ThrottleOutPacketType.Task); |
8979 | break; | 13612 | break; |
8980 | 13613 | ||
8981 | #endregion | 13614 | //#endregion |
8982 | 13615 | ||
8983 | #region Economy/Transaction Packets | 13616 | //#region Economy/Transaction Packets |
8984 | 13617 | ||
8985 | case PacketType.MoneyBalanceRequest: | 13618 | case PacketType.MoneyBalanceRequest: |
8986 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; | 13619 | MoneyBalanceRequestPacket moneybalancerequestpacket = (MoneyBalanceRequestPacket)Pack; |
@@ -9002,6 +13635,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9002 | } | 13635 | } |
9003 | 13636 | ||
9004 | break; | 13637 | break; |
13638 | |||
9005 | case PacketType.EconomyDataRequest: | 13639 | case PacketType.EconomyDataRequest: |
9006 | 13640 | ||
9007 | 13641 | ||
@@ -9011,6 +13645,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9011 | handlerEconomoyDataRequest(AgentId); | 13645 | handlerEconomoyDataRequest(AgentId); |
9012 | } | 13646 | } |
9013 | break; | 13647 | break; |
13648 | |||
9014 | case PacketType.RequestPayPrice: | 13649 | case PacketType.RequestPayPrice: |
9015 | RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack; | 13650 | RequestPayPricePacket requestPayPricePacket = (RequestPayPricePacket)Pack; |
9016 | 13651 | ||
@@ -9080,9 +13715,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9080 | } | 13715 | } |
9081 | break; | 13716 | break; |
9082 | 13717 | ||
9083 | #endregion | 13718 | //#endregion |
9084 | 13719 | ||
9085 | #region Script Packets | 13720 | //#region Script Packets |
9086 | 13721 | ||
9087 | case PacketType.GetScriptRunning: | 13722 | case PacketType.GetScriptRunning: |
9088 | GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack; | 13723 | GetScriptRunningPacket scriptRunning = (GetScriptRunningPacket)Pack; |
@@ -9132,9 +13767,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9132 | } | 13767 | } |
9133 | break; | 13768 | break; |
9134 | 13769 | ||
9135 | #endregion | 13770 | //#endregion |
9136 | 13771 | ||
9137 | #region Gesture Managment | 13772 | //#region Gesture Managment |
9138 | 13773 | ||
9139 | case PacketType.ActivateGestures: | 13774 | case PacketType.ActivateGestures: |
9140 | ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack; | 13775 | ActivateGesturesPacket activateGesturePacket = (ActivateGesturesPacket)Pack; |
@@ -9201,7 +13836,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9201 | } | 13836 | } |
9202 | break; | 13837 | break; |
9203 | 13838 | ||
9204 | #endregion | 13839 | //#endregion |
9205 | 13840 | ||
9206 | case PacketType.AgentFOV: | 13841 | case PacketType.AgentFOV: |
9207 | AgentFOVPacket fovPacket = (AgentFOVPacket)Pack; | 13842 | AgentFOVPacket fovPacket = (AgentFOVPacket)Pack; |
@@ -9217,7 +13852,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9217 | } | 13852 | } |
9218 | break; | 13853 | break; |
9219 | 13854 | ||
9220 | #region unimplemented handlers | 13855 | //#region unimplemented handlers |
9221 | 13856 | ||
9222 | case PacketType.ViewerStats: | 13857 | case PacketType.ViewerStats: |
9223 | // TODO: handle this packet | 13858 | // TODO: handle this packet |
@@ -9251,6 +13886,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9251 | // TODO: handle this packet | 13886 | // TODO: handle this packet |
9252 | //m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); | 13887 | //m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); |
9253 | break; | 13888 | break; |
13889 | |||
9254 | case PacketType.MuteListRequest: | 13890 | case PacketType.MuteListRequest: |
9255 | MuteListRequestPacket muteListRequest = | 13891 | MuteListRequestPacket muteListRequest = |
9256 | (MuteListRequestPacket)Pack; | 13892 | (MuteListRequestPacket)Pack; |
@@ -9274,6 +13910,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9274 | SendUseCachedMuteList(); | 13910 | SendUseCachedMuteList(); |
9275 | } | 13911 | } |
9276 | break; | 13912 | break; |
13913 | |||
9277 | case PacketType.UseCircuitCode: | 13914 | case PacketType.UseCircuitCode: |
9278 | // Don't display this one, we handle it at a lower level | 13915 | // Don't display this one, we handle it at a lower level |
9279 | break; | 13916 | break; |
@@ -9288,6 +13925,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9288 | //m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); | 13925 | //m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); |
9289 | 13926 | ||
9290 | break; | 13927 | break; |
13928 | |||
9291 | case PacketType.DirPlacesQuery: | 13929 | case PacketType.DirPlacesQuery: |
9292 | DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack; | 13930 | DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack; |
9293 | //m_log.Debug(dirPlacesQueryPacket.ToString()); | 13931 | //m_log.Debug(dirPlacesQueryPacket.ToString()); |
@@ -9315,6 +13953,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9315 | dirPlacesQueryPacket.QueryData.QueryStart); | 13953 | dirPlacesQueryPacket.QueryData.QueryStart); |
9316 | } | 13954 | } |
9317 | break; | 13955 | break; |
13956 | |||
9318 | case PacketType.DirFindQuery: | 13957 | case PacketType.DirFindQuery: |
9319 | DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack; | 13958 | DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack; |
9320 | 13959 | ||
@@ -9338,6 +13977,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9338 | dirFindQueryPacket.QueryData.QueryStart); | 13977 | dirFindQueryPacket.QueryData.QueryStart); |
9339 | } | 13978 | } |
9340 | break; | 13979 | break; |
13980 | |||
9341 | case PacketType.DirLandQuery: | 13981 | case PacketType.DirLandQuery: |
9342 | DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack; | 13982 | DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack; |
9343 | 13983 | ||
@@ -9362,6 +14002,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9362 | dirLandQueryPacket.QueryData.QueryStart); | 14002 | dirLandQueryPacket.QueryData.QueryStart); |
9363 | } | 14003 | } |
9364 | break; | 14004 | break; |
14005 | |||
9365 | case PacketType.DirPopularQuery: | 14006 | case PacketType.DirPopularQuery: |
9366 | DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack; | 14007 | DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack; |
9367 | 14008 | ||
@@ -9382,6 +14023,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9382 | dirPopularQueryPacket.QueryData.QueryFlags); | 14023 | dirPopularQueryPacket.QueryData.QueryFlags); |
9383 | } | 14024 | } |
9384 | break; | 14025 | break; |
14026 | |||
9385 | case PacketType.DirClassifiedQuery: | 14027 | case PacketType.DirClassifiedQuery: |
9386 | DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack; | 14028 | DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack; |
9387 | 14029 | ||
@@ -9406,6 +14048,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9406 | dirClassifiedQueryPacket.QueryData.QueryStart); | 14048 | dirClassifiedQueryPacket.QueryData.QueryStart); |
9407 | } | 14049 | } |
9408 | break; | 14050 | break; |
14051 | |||
9409 | case PacketType.EventInfoRequest: | 14052 | case PacketType.EventInfoRequest: |
9410 | EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack; | 14053 | EventInfoRequestPacket eventInfoRequestPacket = (EventInfoRequestPacket)Pack; |
9411 | 14054 | ||
@@ -9424,7 +14067,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9424 | } | 14067 | } |
9425 | break; | 14068 | break; |
9426 | 14069 | ||
9427 | #region Calling Card | 14070 | //#region Calling Card |
9428 | 14071 | ||
9429 | case PacketType.OfferCallingCard: | 14072 | case PacketType.OfferCallingCard: |
9430 | OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack; | 14073 | OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack; |
@@ -9486,9 +14129,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9486 | declineCallingCardPacket.TransactionBlock.TransactionID); | 14129 | declineCallingCardPacket.TransactionBlock.TransactionID); |
9487 | } | 14130 | } |
9488 | break; | 14131 | break; |
9489 | #endregion | 14132 | //#endregion |
9490 | 14133 | ||
9491 | #region Groups | 14134 | //#region Groups |
9492 | case PacketType.ActivateGroup: | 14135 | case PacketType.ActivateGroup: |
9493 | ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack; | 14136 | ActivateGroupPacket activateGroupPacket = (ActivateGroupPacket)Pack; |
9494 | 14137 | ||
@@ -9508,6 +14151,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9508 | } | 14151 | } |
9509 | break; | 14152 | break; |
9510 | 14153 | ||
14154 | |||
9511 | case PacketType.GroupTitlesRequest: | 14155 | case PacketType.GroupTitlesRequest: |
9512 | GroupTitlesRequestPacket groupTitlesRequest = | 14156 | GroupTitlesRequestPacket groupTitlesRequest = |
9513 | (GroupTitlesRequestPacket)Pack; | 14157 | (GroupTitlesRequestPacket)Pack; |
@@ -9969,8 +14613,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
9969 | 14613 | ||
9970 | OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task); | 14614 | OutPacket(groupNoticesListReply, ThrottleOutPacketType.Task); |
9971 | } | 14615 | } |
9972 | 14616 | ||
9973 | break; | 14617 | break; |
14618 | |||
9974 | case PacketType.GroupNoticeRequest: | 14619 | case PacketType.GroupNoticeRequest: |
9975 | GroupNoticeRequestPacket groupNoticeRequest = | 14620 | GroupNoticeRequestPacket groupNoticeRequest = |
9976 | (GroupNoticeRequestPacket)Pack; | 14621 | (GroupNoticeRequestPacket)Pack; |
@@ -10141,7 +14786,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10141 | } | 14786 | } |
10142 | break; | 14787 | break; |
10143 | 14788 | ||
10144 | #endregion | 14789 | //#endregion |
14790 | |||
10145 | case PacketType.StartLure: | 14791 | case PacketType.StartLure: |
10146 | StartLurePacket startLureRequest = (StartLurePacket)Pack; | 14792 | StartLurePacket startLureRequest = (StartLurePacket)Pack; |
10147 | 14793 | ||
@@ -10373,6 +15019,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10373 | if (handlerPickDelete != null) | 15019 | if (handlerPickDelete != null) |
10374 | handlerPickDelete(this, pickDelete.Data.PickID); | 15020 | handlerPickDelete(this, pickDelete.Data.PickID); |
10375 | break; | 15021 | break; |
15022 | |||
10376 | case PacketType.PickGodDelete: | 15023 | case PacketType.PickGodDelete: |
10377 | PickGodDeletePacket pickGodDelete = | 15024 | PickGodDeletePacket pickGodDelete = |
10378 | (PickGodDeletePacket)Pack; | 15025 | (PickGodDeletePacket)Pack; |
@@ -10393,6 +15040,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10393 | pickGodDelete.Data.PickID, | 15040 | pickGodDelete.Data.PickID, |
10394 | pickGodDelete.Data.QueryID); | 15041 | pickGodDelete.Data.QueryID); |
10395 | break; | 15042 | break; |
15043 | |||
10396 | case PacketType.PickInfoUpdate: | 15044 | case PacketType.PickInfoUpdate: |
10397 | PickInfoUpdatePacket pickInfoUpdate = | 15045 | PickInfoUpdatePacket pickInfoUpdate = |
10398 | (PickInfoUpdatePacket)Pack; | 15046 | (PickInfoUpdatePacket)Pack; |
@@ -10418,6 +15066,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10418 | pickInfoUpdate.Data.SortOrder, | 15066 | pickInfoUpdate.Data.SortOrder, |
10419 | pickInfoUpdate.Data.Enabled); | 15067 | pickInfoUpdate.Data.Enabled); |
10420 | break; | 15068 | break; |
15069 | |||
10421 | case PacketType.AvatarNotesUpdate: | 15070 | case PacketType.AvatarNotesUpdate: |
10422 | AvatarNotesUpdatePacket avatarNotesUpdate = | 15071 | AvatarNotesUpdatePacket avatarNotesUpdate = |
10423 | (AvatarNotesUpdatePacket)Pack; | 15072 | (AvatarNotesUpdatePacket)Pack; |
@@ -10450,7 +15099,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10450 | break; | 15099 | break; |
10451 | } | 15100 | } |
10452 | #endregion | 15101 | #endregion |
10453 | 15102 | ||
10454 | AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate; | 15103 | AvatarInterestUpdate handlerAvatarInterestUpdate = OnAvatarInterestUpdate; |
10455 | if (handlerAvatarInterestUpdate != null) | 15104 | if (handlerAvatarInterestUpdate != null) |
10456 | handlerAvatarInterestUpdate(this, | 15105 | handlerAvatarInterestUpdate(this, |
@@ -10497,11 +15146,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
10497 | placesQueryPacket.QueryData.SimName), | 15146 | placesQueryPacket.QueryData.SimName), |
10498 | this); | 15147 | this); |
10499 | break; | 15148 | break; |
15149 | */ | ||
15150 | #endregion | ||
10500 | default: | 15151 | default: |
10501 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); | 15152 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); |
10502 | break; | 15153 | break; |
10503 | |||
10504 | #endregion | ||
10505 | } | 15154 | } |
10506 | 15155 | ||
10507 | PacketPool.Instance.ReturnPacket(Pack); | 15156 | PacketPool.Instance.ReturnPacket(Pack); |