Committing diva's LandSnapshot update patch. Also included is a small
fix for the LandManagementModule. I changed LandSnapshot to use CachedUserInfo to take a load off the user server. Also, missing owner profiles are legit, warning removed.0.6.0-stable
parent
0644977819
commit
85ae8e3e94
|
@ -37,6 +37,7 @@ using OpenSim.Region.Environment.Interfaces;
|
||||||
using OpenSim.Region.Environment.Modules.World.Land;
|
using OpenSim.Region.Environment.Modules.World.Land;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
|
using OpenSim.Framework.Communications.Cache;
|
||||||
|
|
||||||
namespace OpenSim.Region.DataSnapshot.Providers
|
namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
{
|
{
|
||||||
|
@ -162,6 +163,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
directory_attr.Value = GetShowInSearch(parcel);
|
directory_attr.Value = GetShowInSearch(parcel);
|
||||||
//XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
|
//XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
|
||||||
//entities_attr.Value = land.primsOverMe.Count.ToString();
|
//entities_attr.Value = land.primsOverMe.Count.ToString();
|
||||||
|
xmlparcel.Attributes.Append(directory_attr);
|
||||||
xmlparcel.Attributes.Append(scripts_attr);
|
xmlparcel.Attributes.Append(scripts_attr);
|
||||||
xmlparcel.Attributes.Append(build_attr);
|
xmlparcel.Attributes.Append(build_attr);
|
||||||
xmlparcel.Attributes.Append(public_attr);
|
xmlparcel.Attributes.Append(public_attr);
|
||||||
|
@ -244,13 +246,13 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
||||||
UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(userOwnerUUID);
|
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userOwnerUUID);
|
||||||
username.InnerText = userProfile.FirstName + " " + userProfile.SurName;
|
username.InnerText = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName;
|
||||||
userblock.AppendChild(username);
|
userblock.AppendChild(username);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
m_log.Info("[DATASNAPSHOT]: Cannot find owner name; ignoring this parcel");
|
//m_log.Info("[DATASNAPSHOT]: Cannot find owner name; ignoring this parcel");
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlparcel.AppendChild(userblock);
|
xmlparcel.AppendChild(userblock);
|
||||||
|
@ -327,7 +329,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
|
|
||||||
private string CheckForSale(LandData parcel)
|
private string CheckForSale(LandData parcel)
|
||||||
{
|
{
|
||||||
if (parcel.SalePrice > 0)
|
if ((parcel.Flags & (uint)Parcel.ParcelFlags.ForSale) == (uint)Parcel.ParcelFlags.ForSale)
|
||||||
return "true";
|
return "true";
|
||||||
else
|
else
|
||||||
return "false";
|
return "false";
|
||||||
|
@ -409,3 +411,4 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,6 +144,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||||
{
|
{
|
||||||
if (landList.ContainsKey(local_id))
|
if (landList.ContainsKey(local_id))
|
||||||
{
|
{
|
||||||
|
newData.LocalID = local_id;
|
||||||
landList[local_id].landData = newData.Copy();
|
landList[local_id].landData = newData.Copy();
|
||||||
m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, landList[local_id]);
|
m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, landList[local_id]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue