aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginResponse.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginResponse.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs83
1 files changed, 75 insertions, 8 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index 9ec744f..c3756d0 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -190,6 +190,8 @@ namespace OpenSim.Services.LLLoginService
190 private BuddyList m_buddyList = null; 190 private BuddyList m_buddyList = null;
191 191
192 private string currency; 192 private string currency;
193 private string classifiedFee;
194 private int maxAgentGroups;
193 195
194 static LLLoginResponse() 196 static LLLoginResponse()
195 { 197 {
@@ -226,8 +228,8 @@ namespace OpenSim.Services.LLLoginService
226 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, 228 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo,
227 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, 229 GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
228 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, 230 string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
229 GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, 231 GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency,
230 string DSTZone) 232 string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups)
231 : this() 233 : this()
232 { 234 {
233 FillOutInventoryData(invSkel, libService); 235 FillOutInventoryData(invSkel, libService);
@@ -246,14 +248,19 @@ namespace OpenSim.Services.LLLoginService
246 MapTileURL = mapTileURL; 248 MapTileURL = mapTileURL;
247 ProfileURL = profileURL; 249 ProfileURL = profileURL;
248 OpenIDURL = openIDURL; 250 OpenIDURL = openIDURL;
251 DestinationsURL = destinationsURL;
252 AvatarsURL = avatarsURL;
249 253
250 SearchURL = searchURL; 254 SearchURL = searchURL;
251 Currency = currency; 255 Currency = currency;
256 ClassifiedFee = classifiedFee;
257 MaxAgentGroups = maxAgentGroups;
252 258
253 FillOutHomeData(pinfo, home); 259 FillOutHomeData(pinfo, home);
254 LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); 260 LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z);
255 261
256 FillOutRegionData(destination); 262 FillOutRegionData(destination);
263 m_log.DebugFormat("[LOGIN RESPONSE] LLLoginResponse create. sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY);
257 264
258 FillOutSeedCap(aCircuit, destination, clientIP); 265 FillOutSeedCap(aCircuit, destination, clientIP);
259 266
@@ -356,7 +363,8 @@ namespace OpenSim.Services.LLLoginService
356 363
357 private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) 364 private void FillOutHomeData(GridUserInfo pinfo, GridRegion home)
358 { 365 {
359 int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; 366 int x = (int)Util.RegionToWorldLoc(1000);
367 int y = (int)Util.RegionToWorldLoc(1000);
360 if (home != null) 368 if (home != null)
361 { 369 {
362 x = home.RegionLocX; 370 x = home.RegionLocX;
@@ -379,6 +387,8 @@ namespace OpenSim.Services.LLLoginService
379 SimPort = (uint)endPoint.Port; 387 SimPort = (uint)endPoint.Port;
380 RegionX = (uint)destination.RegionLocX; 388 RegionX = (uint)destination.RegionLocX;
381 RegionY = (uint)destination.RegionLocY; 389 RegionY = (uint)destination.RegionLocY;
390 RegionSizeX = destination.RegionSizeX;
391 RegionSizeY = destination.RegionSizeY;
382 } 392 }
383 393
384 private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) 394 private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient)
@@ -428,10 +438,23 @@ namespace OpenSim.Services.LLLoginService
428 ErrorReason = "key"; 438 ErrorReason = "key";
429 welcomeMessage = "Welcome to OpenSim!"; 439 welcomeMessage = "Welcome to OpenSim!";
430 seedCapability = String.Empty; 440 seedCapability = String.Empty;
431 home = "{'region_handle':[r" + (1000*Constants.RegionSize).ToString() + ",r" + (1000*Constants.RegionSize).ToString() + "], 'position':[r" + 441 home = "{'region_handle':["
432 userProfile.homepos.X.ToString() + ",r" + userProfile.homepos.Y.ToString() + ",r" + 442 + "r" + Util.RegionToWorldLoc(1000).ToString()
433 userProfile.homepos.Z.ToString() + "], 'look_at':[r" + userProfile.homelookat.X.ToString() + ",r" + 443 + ","
434 userProfile.homelookat.Y.ToString() + ",r" + userProfile.homelookat.Z.ToString() + "]}"; 444 + "r" + Util.RegionToWorldLoc(1000).ToString()
445 + "], 'position':["
446 + "r" + userProfile.homepos.X.ToString()
447 + ","
448 + "r" + userProfile.homepos.Y.ToString()
449 + ","
450 + "r" + userProfile.homepos.Z.ToString()
451 + "], 'look_at':["
452 + "r" + userProfile.homelookat.X.ToString()
453 + ","
454 + "r" + userProfile.homelookat.Y.ToString()
455 + ","
456 + "r" + userProfile.homelookat.Z.ToString()
457 + "]}";
435 lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; 458 lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]";
436 RegionX = (uint) 255232; 459 RegionX = (uint) 255232;
437 RegionY = (uint) 254976; 460 RegionY = (uint) 254976;
@@ -461,6 +484,8 @@ namespace OpenSim.Services.LLLoginService
461 searchURL = String.Empty; 484 searchURL = String.Empty;
462 485
463 currency = String.Empty; 486 currency = String.Empty;
487 ClassifiedFee = "0";
488 MaxAgentGroups = 42;
464 } 489 }
465 490
466 491
@@ -520,9 +545,13 @@ namespace OpenSim.Services.LLLoginService
520 responseData["seed_capability"] = seedCapability; 545 responseData["seed_capability"] = seedCapability;
521 responseData["home"] = home; 546 responseData["home"] = home;
522 responseData["look_at"] = lookAt; 547 responseData["look_at"] = lookAt;
548 responseData["max-agent-groups"] = MaxAgentGroups;
523 responseData["message"] = welcomeMessage; 549 responseData["message"] = welcomeMessage;
524 responseData["region_x"] = (Int32)(RegionX); 550 responseData["region_x"] = (Int32)(RegionX);
525 responseData["region_y"] = (Int32)(RegionY); 551 responseData["region_y"] = (Int32)(RegionY);
552 responseData["region_size_x"] = (Int32)RegionSizeX;
553 responseData["region_size_y"] = (Int32)RegionSizeY;
554 m_log.DebugFormat("[LOGIN RESPONSE] returning sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY);
526 555
527 if (searchURL != String.Empty) 556 if (searchURL != String.Empty)
528 responseData["search"] = searchURL; 557 responseData["search"] = searchURL;
@@ -533,6 +562,12 @@ namespace OpenSim.Services.LLLoginService
533 if (profileURL != String.Empty) 562 if (profileURL != String.Empty)
534 responseData["profile-server-url"] = profileURL; 563 responseData["profile-server-url"] = profileURL;
535 564
565 if (DestinationsURL != String.Empty)
566 responseData["destination_guide_url"] = DestinationsURL;
567
568 if (AvatarsURL != String.Empty)
569 responseData["avatar_picker_url"] = AvatarsURL;
570
536 // We need to send an openid_token back in the response too 571 // We need to send an openid_token back in the response too
537 if (openIDURL != String.Empty) 572 if (openIDURL != String.Empty)
538 responseData["openid_url"] = openIDURL; 573 responseData["openid_url"] = openIDURL;
@@ -547,6 +582,9 @@ namespace OpenSim.Services.LLLoginService
547 // responseData["real_currency"] = currency; 582 // responseData["real_currency"] = currency;
548 responseData["currency"] = currency; 583 responseData["currency"] = currency;
549 } 584 }
585
586 if (ClassifiedFee != String.Empty)
587 responseData["classified_fee"] = ClassifiedFee;
550 588
551 responseData["login"] = "true"; 589 responseData["login"] = "true";
552 590
@@ -635,6 +673,7 @@ namespace OpenSim.Services.LLLoginService
635 map["seed_capability"] = OSD.FromString(seedCapability); 673 map["seed_capability"] = OSD.FromString(seedCapability);
636 map["home"] = OSD.FromString(home); 674 map["home"] = OSD.FromString(home);
637 map["look_at"] = OSD.FromString(lookAt); 675 map["look_at"] = OSD.FromString(lookAt);
676 map["max-agent-groups"] = OSD.FromInteger(MaxAgentGroups);
638 map["message"] = OSD.FromString(welcomeMessage); 677 map["message"] = OSD.FromString(welcomeMessage);
639 map["region_x"] = OSD.FromInteger(RegionX); 678 map["region_x"] = OSD.FromInteger(RegionX);
640 map["region_y"] = OSD.FromInteger(RegionY); 679 map["region_y"] = OSD.FromInteger(RegionY);
@@ -651,6 +690,9 @@ namespace OpenSim.Services.LLLoginService
651 if (searchURL != String.Empty) 690 if (searchURL != String.Empty)
652 map["search"] = OSD.FromString(searchURL); 691 map["search"] = OSD.FromString(searchURL);
653 692
693 if (ClassifiedFee != String.Empty)
694 map["classified_fee"] = OSD.FromString(ClassifiedFee);
695
654 if (m_buddyList != null) 696 if (m_buddyList != null)
655 { 697 {
656 map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); 698 map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
@@ -746,7 +788,7 @@ namespace OpenSim.Services.LLLoginService
746 Hashtable TempHash; 788 Hashtable TempHash;
747 foreach (InventoryFolderBase InvFolder in folders) 789 foreach (InventoryFolderBase InvFolder in folders)
748 { 790 {
749 if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == "My Inventory") 791 if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == InventoryFolderBase.ROOT_FOLDER_NAME)
750 { 792 {
751 rootID = InvFolder.ID; 793 rootID = InvFolder.ID;
752 } 794 }
@@ -900,6 +942,9 @@ namespace OpenSim.Services.LLLoginService
900 set { regionY = value; } 942 set { regionY = value; }
901 } 943 }
902 944
945 public int RegionSizeX { get; private set; }
946 public int RegionSizeY { get; private set; }
947
903 public string SunTexture 948 public string SunTexture
904 { 949 {
905 get { return sunTexture; } 950 get { return sunTexture; }
@@ -1056,6 +1101,28 @@ namespace OpenSim.Services.LLLoginService
1056 set { currency = value; } 1101 set { currency = value; }
1057 } 1102 }
1058 1103
1104 public string ClassifiedFee
1105 {
1106 get { return classifiedFee; }
1107 set { classifiedFee = value; }
1108 }
1109
1110 public int MaxAgentGroups
1111 {
1112 get { return maxAgentGroups; }
1113 set { maxAgentGroups = value; }
1114 }
1115
1116 public string DestinationsURL
1117 {
1118 get; set;
1119 }
1120
1121 public string AvatarsURL
1122 {
1123 get; set;
1124 }
1125
1059 #endregion 1126 #endregion
1060 1127
1061 public class UserInfo 1128 public class UserInfo