From 386c3e41f0e92737f0478cf789438e8fb3c3c1e3 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 17 Sep 2008 23:08:46 +0000 Subject: Add various XML elements to the data snapshot. Changes by Fly-Man and myself. Fix a crash in DataSnapshot when no master avatar and no estate owner is set (e.g. "Mainland"). --- OpenSim/Region/DataSnapshot/LandSnapshot.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/DataSnapshot/LandSnapshot.cs') diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs index dc7ef8c..a06c64f 100644 --- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs @@ -145,11 +145,20 @@ namespace OpenSim.Region.DataSnapshot.Providers // Attributes of the parcel node XmlAttribute scripts_attr = nodeFactory.CreateAttribute("scripts"); scripts_attr.Value = GetScriptsPermissions(parcel); + XmlAttribute build_attr = nodeFactory.CreateAttribute("build"); + build_attr.Value = GetBuildPermissions(parcel); + XmlAttribute public_attr = nodeFactory.CreateAttribute("public"); + public_attr.Value = GetPublicPermissions(parcel); + // Check the category of the Parcel XmlAttribute category_attr = nodeFactory.CreateAttribute("category"); category_attr.Value = parcel.Category.ToString(); + + //XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities"); //entities_attr.Value = land.primsOverMe.Count.ToString(); xmlparcel.Attributes.Append(scripts_attr); + xmlparcel.Attributes.Append(build_attr); + xmlparcel.Attributes.Append(public_attr); xmlparcel.Attributes.Append(category_attr); //xmlparcel.Attributes.Append(entities_attr); @@ -279,6 +288,24 @@ namespace OpenSim.Region.DataSnapshot.Providers } + private string GetPublicPermissions(LandData parcel) + { + if ((parcel.Flags & (uint)Parcel.ParcelFlags.UseAccessList) == (uint)Parcel.ParcelFlags.UseAccessList) + return "yes"; + else + return "no"; + + } + + private string GetBuildPermissions(LandData parcel) + { + if ((parcel.Flags & (uint)Parcel.ParcelFlags.CreateObjects) == (uint)Parcel.ParcelFlags.CreateObjects) + return "yes"; + else + return "no"; + + } + #endregion #region Change detection hooks -- cgit v1.1