From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 3 Nov 2016 21:44:39 +1000 Subject: Initial update to OpenSim 0.8.2.1 source code. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 83 +++++++++++++++++++--- 1 file changed, 75 insertions(+), 8 deletions(-) (limited to 'OpenSim/Services/LLLoginService/LLLoginResponse.cs') 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 private BuddyList m_buddyList = null; private string currency; + private string classifiedFee; + private int maxAgentGroups; static LLLoginResponse() { @@ -226,8 +228,8 @@ namespace OpenSim.Services.LLLoginService public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, GridRegion destination, List invSkel, FriendInfo[] friendsList, ILibraryService libService, string where, string startlocation, Vector3 position, Vector3 lookAt, List gestures, string message, - GridRegion home, IPEndPoint clientIP, string mapTileURL, string profileURL, string openIDURL, string searchURL, string currency, - string DSTZone) + GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, + string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) : this() { FillOutInventoryData(invSkel, libService); @@ -246,14 +248,19 @@ namespace OpenSim.Services.LLLoginService MapTileURL = mapTileURL; ProfileURL = profileURL; OpenIDURL = openIDURL; + DestinationsURL = destinationsURL; + AvatarsURL = avatarsURL; SearchURL = searchURL; Currency = currency; + ClassifiedFee = classifiedFee; + MaxAgentGroups = maxAgentGroups; FillOutHomeData(pinfo, home); LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); FillOutRegionData(destination); + m_log.DebugFormat("[LOGIN RESPONSE] LLLoginResponse create. sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); FillOutSeedCap(aCircuit, destination, clientIP); @@ -356,7 +363,8 @@ namespace OpenSim.Services.LLLoginService private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) { - int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; + int x = (int)Util.RegionToWorldLoc(1000); + int y = (int)Util.RegionToWorldLoc(1000); if (home != null) { x = home.RegionLocX; @@ -379,6 +387,8 @@ namespace OpenSim.Services.LLLoginService SimPort = (uint)endPoint.Port; RegionX = (uint)destination.RegionLocX; RegionY = (uint)destination.RegionLocY; + RegionSizeX = destination.RegionSizeX; + RegionSizeY = destination.RegionSizeY; } private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) @@ -428,10 +438,23 @@ namespace OpenSim.Services.LLLoginService ErrorReason = "key"; welcomeMessage = "Welcome to OpenSim!"; seedCapability = String.Empty; - home = "{'region_handle':[r" + (1000*Constants.RegionSize).ToString() + ",r" + (1000*Constants.RegionSize).ToString() + "], 'position':[r" + - userProfile.homepos.X.ToString() + ",r" + userProfile.homepos.Y.ToString() + ",r" + - userProfile.homepos.Z.ToString() + "], 'look_at':[r" + userProfile.homelookat.X.ToString() + ",r" + - userProfile.homelookat.Y.ToString() + ",r" + userProfile.homelookat.Z.ToString() + "]}"; + home = "{'region_handle':[" + + "r" + Util.RegionToWorldLoc(1000).ToString() + + "," + + "r" + Util.RegionToWorldLoc(1000).ToString() + + "], 'position':[" + + "r" + userProfile.homepos.X.ToString() + + "," + + "r" + userProfile.homepos.Y.ToString() + + "," + + "r" + userProfile.homepos.Z.ToString() + + "], 'look_at':[" + + "r" + userProfile.homelookat.X.ToString() + + "," + + "r" + userProfile.homelookat.Y.ToString() + + "," + + "r" + userProfile.homelookat.Z.ToString() + + "]}"; lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; RegionX = (uint) 255232; RegionY = (uint) 254976; @@ -461,6 +484,8 @@ namespace OpenSim.Services.LLLoginService searchURL = String.Empty; currency = String.Empty; + ClassifiedFee = "0"; + MaxAgentGroups = 42; } @@ -520,9 +545,13 @@ namespace OpenSim.Services.LLLoginService responseData["seed_capability"] = seedCapability; responseData["home"] = home; responseData["look_at"] = lookAt; + responseData["max-agent-groups"] = MaxAgentGroups; responseData["message"] = welcomeMessage; responseData["region_x"] = (Int32)(RegionX); responseData["region_y"] = (Int32)(RegionY); + responseData["region_size_x"] = (Int32)RegionSizeX; + responseData["region_size_y"] = (Int32)RegionSizeY; + m_log.DebugFormat("[LOGIN RESPONSE] returning sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); if (searchURL != String.Empty) responseData["search"] = searchURL; @@ -533,6 +562,12 @@ namespace OpenSim.Services.LLLoginService if (profileURL != String.Empty) responseData["profile-server-url"] = profileURL; + if (DestinationsURL != String.Empty) + responseData["destination_guide_url"] = DestinationsURL; + + if (AvatarsURL != String.Empty) + responseData["avatar_picker_url"] = AvatarsURL; + // We need to send an openid_token back in the response too if (openIDURL != String.Empty) responseData["openid_url"] = openIDURL; @@ -547,6 +582,9 @@ namespace OpenSim.Services.LLLoginService // responseData["real_currency"] = currency; responseData["currency"] = currency; } + + if (ClassifiedFee != String.Empty) + responseData["classified_fee"] = ClassifiedFee; responseData["login"] = "true"; @@ -635,6 +673,7 @@ namespace OpenSim.Services.LLLoginService map["seed_capability"] = OSD.FromString(seedCapability); map["home"] = OSD.FromString(home); map["look_at"] = OSD.FromString(lookAt); + map["max-agent-groups"] = OSD.FromInteger(MaxAgentGroups); map["message"] = OSD.FromString(welcomeMessage); map["region_x"] = OSD.FromInteger(RegionX); map["region_y"] = OSD.FromInteger(RegionY); @@ -651,6 +690,9 @@ namespace OpenSim.Services.LLLoginService if (searchURL != String.Empty) map["search"] = OSD.FromString(searchURL); + if (ClassifiedFee != String.Empty) + map["classified_fee"] = OSD.FromString(ClassifiedFee); + if (m_buddyList != null) { map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); @@ -746,7 +788,7 @@ namespace OpenSim.Services.LLLoginService Hashtable TempHash; foreach (InventoryFolderBase InvFolder in folders) { - if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == "My Inventory") + if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == InventoryFolderBase.ROOT_FOLDER_NAME) { rootID = InvFolder.ID; } @@ -900,6 +942,9 @@ namespace OpenSim.Services.LLLoginService set { regionY = value; } } + public int RegionSizeX { get; private set; } + public int RegionSizeY { get; private set; } + public string SunTexture { get { return sunTexture; } @@ -1056,6 +1101,28 @@ namespace OpenSim.Services.LLLoginService set { currency = value; } } + public string ClassifiedFee + { + get { return classifiedFee; } + set { classifiedFee = value; } + } + + public int MaxAgentGroups + { + get { return maxAgentGroups; } + set { maxAgentGroups = value; } + } + + public string DestinationsURL + { + get; set; + } + + public string AvatarsURL + { + get; set; + } + #endregion public class UserInfo -- cgit v1.1