aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-06 00:20:27 +0000
committerMelanie Thielker2008-10-06 00:20:27 +0000
commit559a4f7496f0a014a3952df89f53cb90e17a2253 (patch)
tree97ce668d702275cd189ac588ea21a7c884d3f400 /OpenSim
parentImplements ObjectOwner god mode packet (Set Owner To Me admin option) (diff)
downloadopensim-SC_OLD-559a4f7496f0a014a3952df89f53cb90e17a2253.zip
opensim-SC_OLD-559a4f7496f0a014a3952df89f53cb90e17a2253.tar.gz
opensim-SC_OLD-559a4f7496f0a014a3952df89f53cb90e17a2253.tar.bz2
opensim-SC_OLD-559a4f7496f0a014a3952df89f53cb90e17a2253.tar.xz
Patch by Fly-Man, with modifications. Add more fields to DataSnapshot.
This changes yes/no to true/false. Will likely break Metaverseink in some way.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/DataSnapshot/LandSnapshot.cs47
1 files changed, 36 insertions, 11 deletions
diff --git a/OpenSim/Region/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
index 18186d1..1ea70a9 100644
--- a/OpenSim/Region/DataSnapshot/LandSnapshot.cs
+++ b/OpenSim/Region/DataSnapshot/LandSnapshot.cs
@@ -136,8 +136,8 @@ namespace OpenSim.Region.DataSnapshot.Providers
136 LandObject land = (LandObject)parcel_interface; 136 LandObject land = (LandObject)parcel_interface;
137 137
138 LandData parcel = land.landData; 138 LandData parcel = land.landData;
139 if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory) 139// if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)
140 { 140// {
141 141
142 //TODO: make better method of marshalling data from LandData to XmlNode 142 //TODO: make better method of marshalling data from LandData to XmlNode
143 XmlNode xmlparcel = nodeFactory.CreateNode(XmlNodeType.Element, "parcel", ""); 143 XmlNode xmlparcel = nodeFactory.CreateNode(XmlNodeType.Element, "parcel", "");
@@ -152,14 +152,22 @@ namespace OpenSim.Region.DataSnapshot.Providers
152 // Check the category of the Parcel 152 // Check the category of the Parcel
153 XmlAttribute category_attr = nodeFactory.CreateAttribute("category"); 153 XmlAttribute category_attr = nodeFactory.CreateAttribute("category");
154 category_attr.Value = ((int)parcel.Category).ToString(); 154 category_attr.Value = ((int)parcel.Category).ToString();
155 155 // Check if the parcel is for sale
156 156 XmlAttribute forsale_attr = nodeFactory.CreateAttribute("forsale");
157 forsale_attr.Value = CheckForSale(parcel);
158 XmlAttribute sales_attr = nodeFactory.CreateAttribute("salesprice");
159 sales_attr.Value = parcel.SalePrice.ToString();
160
161 XmlAttribute directory_attr = nodeFactory.CreateAttribute("show_directory");
162 directory_attr.Value = GetShowInSearch(parcel);
157 //XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities"); 163 //XmlAttribute entities_attr = nodeFactory.CreateAttribute("entities");
158 //entities_attr.Value = land.primsOverMe.Count.ToString(); 164 //entities_attr.Value = land.primsOverMe.Count.ToString();
159 xmlparcel.Attributes.Append(scripts_attr); 165 xmlparcel.Attributes.Append(scripts_attr);
160 xmlparcel.Attributes.Append(build_attr); 166 xmlparcel.Attributes.Append(build_attr);
161 xmlparcel.Attributes.Append(public_attr); 167 xmlparcel.Attributes.Append(public_attr);
162 xmlparcel.Attributes.Append(category_attr); 168 xmlparcel.Attributes.Append(category_attr);
169 xmlparcel.Attributes.Append(forsale_attr);
170 xmlparcel.Attributes.Append(sales_attr);
163 //xmlparcel.Attributes.Append(entities_attr); 171 //xmlparcel.Attributes.Append(entities_attr);
164 172
165 173
@@ -255,7 +263,7 @@ namespace OpenSim.Region.DataSnapshot.Providers
255 //} 263 //}
256 264
257 parent.AppendChild(xmlparcel); 265 parent.AppendChild(xmlparcel);
258 } 266// }
259 } 267 }
260 //snap.AppendChild(parent); 268 //snap.AppendChild(parent);
261 } 269 }
@@ -293,27 +301,44 @@ namespace OpenSim.Region.DataSnapshot.Providers
293 private string GetScriptsPermissions(LandData parcel) 301 private string GetScriptsPermissions(LandData parcel)
294 { 302 {
295 if ((parcel.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts) 303 if ((parcel.Flags & (uint)Parcel.ParcelFlags.AllowOtherScripts) == (uint)Parcel.ParcelFlags.AllowOtherScripts)
296 return "yes"; 304 return "true";
297 else 305 else
298 return "no"; 306 return "false";
299 307
300 } 308 }
301 309
302 private string GetPublicPermissions(LandData parcel) 310 private string GetPublicPermissions(LandData parcel)
303 { 311 {
304 if ((parcel.Flags & (uint)Parcel.ParcelFlags.UseAccessList) == (uint)Parcel.ParcelFlags.UseAccessList) 312 if ((parcel.Flags & (uint)Parcel.ParcelFlags.UseAccessList) == (uint)Parcel.ParcelFlags.UseAccessList)
305 return "no"; 313 return "false";
306 else 314 else
307 return "yes"; 315 return "true";
308 316
309 } 317 }
310 318
311 private string GetBuildPermissions(LandData parcel) 319 private string GetBuildPermissions(LandData parcel)
312 { 320 {
313 if ((parcel.Flags & (uint)Parcel.ParcelFlags.CreateObjects) == (uint)Parcel.ParcelFlags.CreateObjects) 321 if ((parcel.Flags & (uint)Parcel.ParcelFlags.CreateObjects) == (uint)Parcel.ParcelFlags.CreateObjects)
314 return "yes"; 322 return "true";
323 else
324 return "false";
325
326 }
327
328 private string CheckForSale(LandData parcel)
329 {
330 if (parcel.SalePrice > 0)
331 return "true";
332 else
333 return "false";
334 }
335
336 private string GetShowInSearch(LandData parcel)
337 {
338 if ((parcel.Flags & (uint)Parcel.ParcelFlags.ShowDirectory) == (uint)Parcel.ParcelFlags.ShowDirectory)
339 return "true";
315 else 340 else
316 return "no"; 341 return "false";
317 342
318 } 343 }
319 344