aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
index 74e9a43..435022b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs
@@ -29,6 +29,7 @@ using System.Collections.Generic;
29using libsecondlife; 29using libsecondlife;
30using libsecondlife.Packets; 30using libsecondlife.Packets;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Framework.UserManagement;
32using OpenSim.Framework.Console; 33using OpenSim.Framework.Console;
33 34
34namespace OpenSim.Region.Environment.Scenes 35namespace OpenSim.Region.Environment.Scenes
@@ -155,5 +156,43 @@ namespace OpenSim.Region.Environment.Scenes
155 } 156 }
156 } 157 }
157 } 158 }
159 public void ProcessAvatarPickerRequest(IClientAPI client, LLUUID avatarID, LLUUID RequestID, string query)
160 {
161 //EventManager.TriggerAvatarPickerRequest();
162
163
164 List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>();
165 AvatarResponses = CommsManager.GenerateAgentPickerRequestResponse(RequestID, query);
166
167 AvatarPickerReplyPacket replyPacket = new AvatarPickerReplyPacket();
168 AvatarPickerReplyPacket.DataBlock[] searchData = new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count];
169 AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock();
170
171 agentData.AgentID = avatarID;
172 agentData.QueryID = RequestID;
173 replyPacket.AgentData = agentData;
174 byte[] bytes = new byte[AvatarResponses.Count * 32];
175
176 int i = 0;
177 foreach (AvatarPickerAvatar item in AvatarResponses)
178 {
179 LLUUID translatedIDtem = item.AvatarID;
180 searchData[i] = new AvatarPickerReplyPacket.DataBlock();
181 searchData[i].AvatarID = translatedIDtem;
182 searchData[i].FirstName = Helpers.StringToField((string)item.firstName);
183 searchData[i].LastName = Helpers.StringToField((string)item.lastName);
184 i++;
185
186 }
187 if (AvatarResponses.Count == 0)
188 {
189 searchData = new AvatarPickerReplyPacket.DataBlock[0];
190 }
191 replyPacket.Data = searchData;
192 client.SendAvatarPickerReply(replyPacket);
193
194
195 }
196
158 } 197 }
159} \ No newline at end of file 198} \ No newline at end of file