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.Scenes;
|
||||
using OpenMetaverse.Packets;
|
||||
using OpenSim.Framework.Communications.Cache;
|
||||
|
||||
namespace OpenSim.Region.DataSnapshot.Providers
|
||||
{
|
||||
|
@ -136,8 +137,8 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
|||
LandObject land = (LandObject)parcel_interface;
|
||||
|
||||
LandData parcel = land.landData;
|
||||
// if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)
|
||||
// {
|
||||
// if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)
|
||||
// {
|
||||
|
||||
//TODO: make better method of marshalling data from LandData to XmlNode
|
||||
XmlNode xmlparcel = nodeFactory.CreateNode(XmlNodeType.Element, "parcel", "");
|
||||
|
@ -162,6 +163,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
|||
directory_attr.Value = GetShowInSearch(parcel);
|
||||
//XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
|
||||
//entities_attr.Value = land.primsOverMe.Count.ToString();
|
||||
xmlparcel.Attributes.Append(directory_attr);
|
||||
xmlparcel.Attributes.Append(scripts_attr);
|
||||
xmlparcel.Attributes.Append(build_attr);
|
||||
xmlparcel.Attributes.Append(public_attr);
|
||||
|
@ -244,13 +246,13 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
|||
try
|
||||
{
|
||||
XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
|
||||
UserProfileData userProfile = m_scene.CommsManager.UserService.GetUserProfile(userOwnerUUID);
|
||||
username.InnerText = userProfile.FirstName + " " + userProfile.SurName;
|
||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userOwnerUUID);
|
||||
username.InnerText = profile.UserProfile.FirstName + " " + profile.UserProfile.SurName;
|
||||
userblock.AppendChild(username);
|
||||
}
|
||||
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);
|
||||
|
@ -263,7 +265,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
|||
//}
|
||||
|
||||
parent.AppendChild(xmlparcel);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
//snap.AppendChild(parent);
|
||||
}
|
||||
|
@ -327,7 +329,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
|||
|
||||
private string CheckForSale(LandData parcel)
|
||||
{
|
||||
if (parcel.SalePrice > 0)
|
||||
if ((parcel.Flags & (uint)Parcel.ParcelFlags.ForSale) == (uint)Parcel.ParcelFlags.ForSale)
|
||||
return "true";
|
||||
else
|
||||
return "false";
|
||||
|
@ -349,13 +351,13 @@ namespace OpenSim.Region.DataSnapshot.Providers
|
|||
public void OnNewClient(IClientAPI client)
|
||||
{
|
||||
//Land hooks
|
||||
client.OnParcelDivideRequest += delegate (int west, int south, int east, int north,
|
||||
client.OnParcelDivideRequest += delegate(int west, int south, int east, int north,
|
||||
IClientAPI remote_client) { this.Stale = true; };
|
||||
client.OnParcelJoinRequest += delegate (int west, int south, int east, int north,
|
||||
client.OnParcelJoinRequest += delegate(int west, int south, int east, int north,
|
||||
IClientAPI remote_client) { this.Stale = true; };
|
||||
client.OnParcelPropertiesUpdateRequest += delegate(LandUpdateArgs args, int local_id,
|
||||
IClientAPI remote_client) { this.Stale = true; };
|
||||
client.OnParcelBuy += delegate (UUID agentId, UUID groupId, bool final, bool groupOwned,
|
||||
client.OnParcelBuy += delegate(UUID agentId, UUID groupId, bool final, bool groupOwned,
|
||||
bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated)
|
||||
{ this.Stale = true; };
|
||||
}
|
||||
|
@ -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))
|
||||
{
|
||||
newData.LocalID = local_id;
|
||||
landList[local_id].landData = newData.Copy();
|
||||
m_scene.EventManager.TriggerLandObjectUpdated((uint)local_id, landList[local_id]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue