aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs53
1 files changed, 0 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 3355ebe..87ffc74 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -339,59 +339,6 @@ namespace OpenSim.Region.Framework.Scenes
339 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg); 339 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
340 } 340 }
341 341
342 public void ProcessAvatarPickerRequest(IClientAPI client, UUID avatarID, UUID RequestID, string query)
343 {
344 //EventManager.TriggerAvatarPickerRequest();
345
346 List<UserAccount> accounts = UserAccountService.GetUserAccounts(RegionInfo.ScopeID, query);
347
348 if (accounts == null)
349 return;
350
351 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
352 // TODO: don't create new blocks if recycling an old packet
353
354 AvatarPickerReplyPacket.DataBlock[] searchData =
355 new AvatarPickerReplyPacket.DataBlock[accounts.Count];
356 AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock();
357
358 agentData.AgentID = avatarID;
359 agentData.QueryID = RequestID;
360 replyPacket.AgentData = agentData;
361 //byte[] bytes = new byte[AvatarResponses.Count*32];
362
363 int i = 0;
364 foreach (UserAccount item in accounts)
365 {
366 UUID translatedIDtem = item.PrincipalID;
367 searchData[i] = new AvatarPickerReplyPacket.DataBlock();
368 searchData[i].AvatarID = translatedIDtem;
369 searchData[i].FirstName = Utils.StringToBytes((string) item.FirstName);
370 searchData[i].LastName = Utils.StringToBytes((string) item.LastName);
371 i++;
372 }
373 if (accounts.Count == 0)
374 {
375 searchData = new AvatarPickerReplyPacket.DataBlock[0];
376 }
377 replyPacket.Data = searchData;
378
379 AvatarPickerReplyAgentDataArgs agent_data = new AvatarPickerReplyAgentDataArgs();
380 agent_data.AgentID = replyPacket.AgentData.AgentID;
381 agent_data.QueryID = replyPacket.AgentData.QueryID;
382
383 List<AvatarPickerReplyDataArgs> data_args = new List<AvatarPickerReplyDataArgs>();
384 for (i = 0; i < replyPacket.Data.Length; i++)
385 {
386 AvatarPickerReplyDataArgs data_arg = new AvatarPickerReplyDataArgs();
387 data_arg.AvatarID = replyPacket.Data[i].AvatarID;
388 data_arg.FirstName = replyPacket.Data[i].FirstName;
389 data_arg.LastName = replyPacket.Data[i].LastName;
390 data_args.Add(data_arg);
391 }
392 client.SendAvatarPickerReply(agent_data, data_args);
393 }
394
395 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID, 342 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID,
396 UUID itemID) 343 UUID itemID)
397 { 344 {