From 13e3ffada36529bd64909d272b4e25145c26e4c8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sun, 5 Oct 2008 02:25:53 +0000 Subject: Plumb in the DirPlacesReply packet --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 31 ++++++++++++++++++++++ .../Environment/Modules/World/NPC/NPCAvatar.cs | 4 +++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 +++ 3 files changed, 39 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 5d7a1ca..2cb33d0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -6725,6 +6725,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP return string.Empty; } + public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) + { + DirPlacesReplyPacket packet = (DirPlacesReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirPlacesReply); + + packet.AgentData = new DirPlacesReplyPacket.AgentDataBlock(); + + packet.QueryData = new DirPlacesReplyPacket.QueryDataBlock[1]; + packet.QueryData[0] = new DirPlacesReplyPacket.QueryDataBlock(); + + packet.QueryReplies = + new DirPlacesReplyPacket.QueryRepliesBlock[data.Length]; + + packet.AgentData.AgentID = AgentId; + + packet.QueryData[0].QueryID = queryID; + + int i = 0; + foreach (DirPlacesReplyData d in data) + { + packet.QueryReplies[i] = + new DirPlacesReplyPacket.QueryRepliesBlock(); + packet.QueryReplies[i].ParcelID = d.parcelID; + packet.QueryReplies[i].Name = Utils.StringToBytes(d.name); + packet.QueryReplies[i].ForSale = d.forSale; + packet.QueryReplies[i].Auction = d.auction; + packet.QueryReplies[i].Dwell = d.dwell; + } + + OutPacket(packet, ThrottleOutPacketType.Task); + } + public void KillEndDone() { KillPacket kp = new KillPacket(); diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index c190434..99c953c 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -891,6 +891,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } + public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) + { + } + public void KillEndDone() { } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 1566b2e..6fbab0a 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -888,6 +888,10 @@ namespace OpenSim.Region.Examples.SimpleModule { } + public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) + { + } + public void KillEndDone() { } -- cgit v1.1