Merge branch 'master' into httptests

This commit is contained in:
UbitUmarov
2016-12-14 13:35:53 +00:00
33 changed files with 231 additions and 111 deletions

View File

@@ -154,7 +154,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
name = account.FirstName + " " + account.LastName;
created = account.Created;
}
Byte[] charterMember = Utils.StringToBytes(name);
Byte[] membershipType = Utils.StringToBytes(name);
profileUrl = "No profile data";
aboutText = string.Empty;
@@ -166,7 +166,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Profile
remoteClient.SendAvatarProperties(avatarID, aboutText,
Util.ToDateTime(created).ToString(
"M/d/yyyy", CultureInfo.InvariantCulture),
charterMember, firstLifeAboutText,
membershipType, firstLifeAboutText,
(uint)(0 & 0xff),
firstLifeImage, image, profileUrl, partner);

View File

@@ -1009,9 +1009,9 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
if (p != null && p.isNPC)
{
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977",
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born,
Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
UUID.Zero, UUID.Zero, "", UUID.Zero);
UUID.Zero, ((INPC)(p.ControllingClient)).profileImage, "", UUID.Zero);
remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
0, "Getting into trouble", "Droidspeak");
return;
@@ -1032,7 +1032,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
userInfo = new Dictionary<string, object>();
}
Byte[] charterMember = new Byte[1];
Byte[] membershipType = new Byte[1];
string born = String.Empty;
uint flags = 0x00;
@@ -1040,11 +1040,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
{
if (account.UserTitle == "")
{
charterMember[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
membershipType[0] = (Byte)((account.UserFlags & 0xf00) >> 8);
}
else
{
charterMember = Utils.StringToBytes(account.UserTitle);
membershipType = Utils.StringToBytes(account.UserTitle);
}
born = Util.ToDateTime(account.Created).ToString(
@@ -1057,11 +1057,11 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
{
if ((string)userInfo["user_title"] == "")
{
charterMember[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
membershipType[0] = (Byte)(((Byte)userInfo["user_flags"] & 0xf00) >> 8);
}
else
{
charterMember = Utils.StringToBytes((string)userInfo["user_title"]);
membershipType = Utils.StringToBytes((string)userInfo["user_title"]);
}
int val_born = (int)userInfo["user_created"];
@@ -1085,7 +1085,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
return;
}
remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, charterMember , props.FirstLifeText, flags,
remoteClient.SendAvatarProperties(props.UserId, props.AboutText, born, membershipType , props.FirstLifeText, flags,
props.FirstLifeImageId, props.ImageId, props.WebUrl, props.PartnerId);

View File

@@ -456,7 +456,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
}
// Check Default Location (Also See ScenePresence.CompleteMovement)
if (position.X == 128f && position.Y == 128f)
if (position.X == 128f && position.Y == 128f && position.Z == 22.5f)
position = sp.Scene.RegionInfo.DefaultLandingPoint;
// TODO: Get proper AVG Height

View File

@@ -72,8 +72,6 @@ namespace OpenSim.Region.CoreModules.World.Land
public const int LandUnit = 4;
private static readonly string remoteParcelRequestPath = "0009/";
private LandChannel landChannel;
private Scene m_scene;
@@ -1682,12 +1680,13 @@ namespace OpenSim.Region.CoreModules.World.Land
private void EventManagerOnRegisterCaps(UUID agentID, Caps caps)
{
//string capsBase = "/CAPS/" + UUID.Random();
string capsBase = "/CAPS/" + caps.CapsObjectPath;
caps.RegisterHandler(
"RemoteParcelRequest",
new RestStreamHandler(
"POST",
capsBase + remoteParcelRequestPath,
capsBase,
(request, path, param, httpRequest, httpResponse)
=> RemoteParcelRequest(request, path, param, agentID, caps),
"RemoteParcelRequest",
@@ -1807,24 +1806,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ArrayList list = (ArrayList)hash["location"];
uint x = (uint)(double)list[0];
uint y = (uint)(double)list[1];
if(hash.ContainsKey("region_id"))
{
UUID regionID = (UUID)hash["region_id"];
if (regionID == m_scene.RegionInfo.RegionID)
{
// a parcel request for a local parcel => no need to query the grid
parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
}
else
{
// a parcel request for a parcel in another region. Ask the grid about the region
GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
if (info != null)
parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
}
}
else if (hash.ContainsKey("region_handle"))
if (hash.ContainsKey("region_handle"))
{
// if you do a "About Landmark" on a landmark a second time, the viewer sends the
// region_handle it got earlier via RegionHandleRequest
@@ -1847,6 +1829,24 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
}
else if(hash.ContainsKey("region_id"))
{
UUID regionID = (UUID)hash["region_id"];
if (regionID == m_scene.RegionInfo.RegionID)
{
// a parcel request for a local parcel => no need to query the grid
parcelID = Util.BuildFakeParcelID(m_scene.RegionInfo.RegionHandle, x, y);
}
else
{
// a parcel request for a parcel in another region. Ask the grid about the region
GridRegion info = m_scene.GridService.GetRegionByUUID(scope, regionID);
if (info != null)
parcelID = Util.BuildFakeParcelID(info.RegionHandle, x, y);
}
}
}
}
catch (LLSD.LLSDParseException e)

View File

@@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
// while we don't fix the hard-coded urls
if (flags == 2)
{
if (regionInfos.Count == 0)
if (regionInfos == null || regionInfos.Count == 0)
remoteClient.SendAgentAlertMessage("No regions found with that name.", true);
// else if (regionInfos.Count == 1)
// remoteClient.SendAgentAlertMessage("Region found!", false);