aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-10 19:42:36 -0800
committerDiva Canto2010-01-10 19:42:36 -0800
commit0c2946031bccf75c28968b6adcde5cce5bc45c13 (patch)
treea57253af1e81c82ce52dbc44babe60d2defe27fb /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
parentMoved GridInfo service from where it was to Handlers/Grid (diff)
downloadopensim-SC-0c2946031bccf75c28968b6adcde5cce5bc45c13.zip
opensim-SC-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.gz
opensim-SC-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.bz2
opensim-SC-0c2946031bccf75c28968b6adcde5cce5bc45c13.tar.xz
CommunicationsManager is practically empty. Only NetworkServersInfo is there.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index fbb7660..bbb1938 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -332,14 +332,16 @@ namespace OpenSim.Region.Framework.Scenes
332 { 332 {
333 //EventManager.TriggerAvatarPickerRequest(); 333 //EventManager.TriggerAvatarPickerRequest();
334 334
335 List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>(); 335 List<UserAccount> accounts = UserAccountService.GetUserAccounts(RegionInfo.ScopeID, query);
336 AvatarResponses = m_sceneGridService.GenerateAgentPickerRequestResponse(RequestID, query); 336
337 if (accounts == null)
338 return;
337 339
338 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply); 340 AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
339 // TODO: don't create new blocks if recycling an old packet 341 // TODO: don't create new blocks if recycling an old packet
340 342
341 AvatarPickerReplyPacket.DataBlock[] searchData = 343 AvatarPickerReplyPacket.DataBlock[] searchData =
342 new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count]; 344 new AvatarPickerReplyPacket.DataBlock[accounts.Count];
343 AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock(); 345 AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock();
344 346
345 agentData.AgentID = avatarID; 347 agentData.AgentID = avatarID;
@@ -348,16 +350,16 @@ namespace OpenSim.Region.Framework.Scenes
348 //byte[] bytes = new byte[AvatarResponses.Count*32]; 350 //byte[] bytes = new byte[AvatarResponses.Count*32];
349 351
350 int i = 0; 352 int i = 0;
351 foreach (AvatarPickerAvatar item in AvatarResponses) 353 foreach (UserAccount item in accounts)
352 { 354 {
353 UUID translatedIDtem = item.AvatarID; 355 UUID translatedIDtem = item.PrincipalID;
354 searchData[i] = new AvatarPickerReplyPacket.DataBlock(); 356 searchData[i] = new AvatarPickerReplyPacket.DataBlock();
355 searchData[i].AvatarID = translatedIDtem; 357 searchData[i].AvatarID = translatedIDtem;
356 searchData[i].FirstName = Utils.StringToBytes((string) item.firstName); 358 searchData[i].FirstName = Utils.StringToBytes((string) item.FirstName);
357 searchData[i].LastName = Utils.StringToBytes((string) item.lastName); 359 searchData[i].LastName = Utils.StringToBytes((string) item.LastName);
358 i++; 360 i++;
359 } 361 }
360 if (AvatarResponses.Count == 0) 362 if (accounts.Count == 0)
361 { 363 {
362 searchData = new AvatarPickerReplyPacket.DataBlock[0]; 364 searchData = new AvatarPickerReplyPacket.DataBlock[0];
363 } 365 }