aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs59
1 files changed, 42 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d41df3d..fa72410 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2734,32 +2734,57 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2734 packet.QueryData = new DirPlacesReplyPacket.QueryDataBlock[1]; 2734 packet.QueryData = new DirPlacesReplyPacket.QueryDataBlock[1];
2735 packet.QueryData[0] = new DirPlacesReplyPacket.QueryDataBlock(); 2735 packet.QueryData[0] = new DirPlacesReplyPacket.QueryDataBlock();
2736 2736
2737 packet.QueryReplies =
2738 new DirPlacesReplyPacket.QueryRepliesBlock[data.Length];
2739
2740 packet.StatusData = new DirPlacesReplyPacket.StatusDataBlock[
2741 data.Length];
2742
2743 packet.AgentData.AgentID = AgentId; 2737 packet.AgentData.AgentID = AgentId;
2744 2738
2745 packet.QueryData[0].QueryID = queryID; 2739 packet.QueryData[0].QueryID = queryID;
2746 2740
2741 DirPlacesReplyPacket.QueryRepliesBlock[] replies =
2742 new DirPlacesReplyPacket.QueryRepliesBlock[0];
2743 DirPlacesReplyPacket.StatusDataBlock[] status =
2744 new DirPlacesReplyPacket.StatusDataBlock[0];
2745
2747 int i = 0; 2746 int i = 0;
2748 foreach (DirPlacesReplyData d in data) 2747 foreach (DirPlacesReplyData d in data)
2749 { 2748 {
2750 packet.QueryReplies[i] = 2749 int idx = replies.Length;
2751 new DirPlacesReplyPacket.QueryRepliesBlock(); 2750 Array.Resize(ref replies, idx + 1);
2752 packet.StatusData[i] = new DirPlacesReplyPacket.StatusDataBlock(); 2751 Array.Resize(ref status, idx + 1);
2753 packet.QueryReplies[i].ParcelID = d.parcelID; 2752
2754 packet.QueryReplies[i].Name = Utils.StringToBytes(d.name); 2753 replies[idx] = new DirPlacesReplyPacket.QueryRepliesBlock();
2755 packet.QueryReplies[i].ForSale = d.forSale; 2754 status[idx] = new DirPlacesReplyPacket.StatusDataBlock();
2756 packet.QueryReplies[i].Auction = d.auction; 2755 replies[idx].ParcelID = d.parcelID;
2757 packet.QueryReplies[i].Dwell = d.dwell; 2756 replies[idx].Name = Utils.StringToBytes(d.name);
2758 packet.StatusData[i].Status = d.Status; 2757 replies[idx].ForSale = d.forSale;
2759 i++; 2758 replies[idx].Auction = d.auction;
2759 replies[idx].Dwell = d.dwell;
2760 status[idx].Status = d.Status;
2761
2762 packet.QueryReplies = replies;
2763 packet.StatusData = status;
2764
2765 if (packet.Length >= 1000)
2766 {
2767 OutPacket(packet, ThrottleOutPacketType.Task);
2768
2769 packet = (DirPlacesReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirPlacesReply);
2770
2771 packet.AgentData = new DirPlacesReplyPacket.AgentDataBlock();
2772
2773 packet.QueryData = new DirPlacesReplyPacket.QueryDataBlock[1];
2774 packet.QueryData[0] = new DirPlacesReplyPacket.QueryDataBlock();
2775
2776 packet.AgentData.AgentID = AgentId;
2777
2778 packet.QueryData[0].QueryID = queryID;
2779
2780 replies = new DirPlacesReplyPacket.QueryRepliesBlock[0];
2781 status = new DirPlacesReplyPacket.StatusDataBlock[0];
2782
2783 }
2760 } 2784 }
2761 2785
2762 OutPacket(packet, ThrottleOutPacketType.Task); 2786 if (replies.Length > 0)
2787 OutPacket(packet, ThrottleOutPacketType.Task);
2763 } 2788 }
2764 2789
2765 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) 2790 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)