mirror of
https://github.com/kcozens/OpenSimSearch.git
synced 2026-08-14 08:52:28 +00:00
Additions to the DataSnapShot
git-svn-id: http://forge.opensimulator.org/svn/ossearch/trunk@23 109abde3-1f22-4c10-b5d7-b6b0135cd00c
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
Index: OpenSim/Region/DataSnapshot/LandSnapshot.cs
|
||||
===================================================================
|
||||
--- OpenSim/Region/DataSnapshot/LandSnapshot.cs (revision 6693)
|
||||
+++ OpenSim/Region/DataSnapshot/LandSnapshot.cs (working copy)
|
||||
@@ -152,14 +152,20 @@
|
||||
// Check the category of the Parcel
|
||||
XmlAttribute category_attr = nodeFactory.CreateAttribute("category");
|
||||
category_attr.Value = ((int)parcel.Category).ToString();
|
||||
-
|
||||
-
|
||||
+ // Check if the parcel is for sale
|
||||
+ XmlAttribute forsale_attr = nodeFactory.CreateAttribute("forsale");
|
||||
+ forsale_attr.Value = CheckForSale(parcel);
|
||||
+ XmlAttribute sales_attr = nodeFactory.CreateAttribute("salesprice");
|
||||
+ sales_attr.Value = parcel.SalePrice.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(forsale_attr);
|
||||
+ xmlparcel.Attributes.Append(sales_attr);
|
||||
//xmlparcel.Attributes.Append(entities_attr);
|
||||
|
||||
|
||||
@@ -293,30 +299,38 @@
|
||||
private string GetScriptsPermissions(LandData parcel)
|
||||
{
|
||||
if ((parcel.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts)
|
||||
- return "yes";
|
||||
+ return "true";
|
||||
else
|
||||
- return "no";
|
||||
+ return "false";
|
||||
|
||||
}
|
||||
|
||||
private string GetPublicPermissions(LandData parcel)
|
||||
{
|
||||
if ((parcel.Flags & (uint)Parcel.ParcelFlags.UseAccessList) == (uint)Parcel.ParcelFlags.UseAccessList)
|
||||
- return "no";
|
||||
+ return "false";
|
||||
else
|
||||
- return "yes";
|
||||
+ return "true";
|
||||
|
||||
}
|
||||
|
||||
private string GetBuildPermissions(LandData parcel)
|
||||
{
|
||||
if ((parcel.Flags & (uint)Parcel.ParcelFlags.CreateObjects) == (uint)Parcel.ParcelFlags.CreateObjects)
|
||||
- return "yes";
|
||||
+ return "true";
|
||||
else
|
||||
- return "no";
|
||||
+ return "false";
|
||||
|
||||
}
|
||||
|
||||
+ private string CheckForSale(LandData parcel)
|
||||
+ {
|
||||
+ if (parcel.SalePrice > 0)
|
||||
+ return "true";
|
||||
+ else
|
||||
+ return "false";
|
||||
+ }
|
||||
+
|
||||
#endregion
|
||||
|
||||
#region Change detection hooks
|
||||
Reference in New Issue
Block a user