From d91330ea35a7344af0a3a79e1dac7dee69daee22 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 20 Apr 2009 20:43:48 +0000 Subject: Add PlacesQuery packet --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++++++++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 ++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 ++ 3 files changed, 25 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6ac0acd..c12cc69 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -313,6 +313,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP //private AvatarInterestUpdate handlerAvatarInterestUpdate; + private PlacesQuery handlerPlacesQuery; + private readonly IGroupsModule m_GroupsModule; //private TerrainUnacked handlerUnackedTerrain = null; @@ -1112,6 +1114,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP //public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + public void ActivateGesture(UUID assetId, UUID gestureId) { } @@ -9140,6 +9144,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP // // break; + case PacketType.PlacesQuery: + PlacesQueryPacket placesQueryPacket = + (PlacesQueryPacket)Pack; + + handlerPlacesQuery = OnPlacesQuery; + + if (handlerPlacesQuery != null) + handlerPlacesQuery(placesQueryPacket.AgentData.QueryID, + placesQueryPacket.TransactionData.TransactionID, + Utils.BytesToString( + placesQueryPacket.QueryData.QueryText), + placesQueryPacket.QueryData.QueryFlags, + (byte)placesQueryPacket.QueryData.Category, + Utils.BytesToString( + placesQueryPacket.QueryData.SimName), + this); + break; default: m_log.Warn("[CLIENT]: unhandled packet " + Pack); break; diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 34d2ca7..579f09f 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -269,6 +269,8 @@ namespace OpenSim.Region.Examples.SimpleModule public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 private UUID myID = UUID.Random(); diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c721790..abe915c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -375,6 +375,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 #endregion -- cgit v1.1