diff options
author | Justin Clark-Casey (justincc) | 2012-08-03 23:49:34 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-08-03 23:49:34 +0100 |
commit | fb91ca6f1d3e61444005175d0a0d55025d15ad5b (patch) | |
tree | 4f469192c97afc63edd69ce97e8bbcab36ac6dc9 /OpenSim/Framework/Serialization/External/LandDataSerializer.cs | |
parent | Fix build break. (diff) | |
download | opensim-SC_OLD-fb91ca6f1d3e61444005175d0a0d55025d15ad5b.zip opensim-SC_OLD-fb91ca6f1d3e61444005175d0a0d55025d15ad5b.tar.gz opensim-SC_OLD-fb91ca6f1d3e61444005175d0a0d55025d15ad5b.tar.bz2 opensim-SC_OLD-fb91ca6f1d3e61444005175d0a0d55025d15ad5b.tar.xz |
Fix old regression that stopped saving parcel owner data in OARs.
This was working in 0.7.2 but was accidentally removed from 0.7.3.
The --publish option for "save oar" will now save oars stripped of parcel owner information as well as scene object info.
Please use the --publish option if you want to publish oars that may be later loaded by others to the same grid from which they were saved.
Diffstat (limited to 'OpenSim/Framework/Serialization/External/LandDataSerializer.cs')
-rw-r--r-- | OpenSim/Framework/Serialization/External/LandDataSerializer.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs index a64f01c..709b516 100644 --- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs +++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs | |||
@@ -93,6 +93,8 @@ namespace OpenSim.Framework.Serialization.External | |||
93 | "MediaURL", (ld, xtr) => ld.MediaURL = xtr.ReadElementString("MediaURL")); | 93 | "MediaURL", (ld, xtr) => ld.MediaURL = xtr.ReadElementString("MediaURL")); |
94 | m_ldProcessors.Add( | 94 | m_ldProcessors.Add( |
95 | "MusicURL", (ld, xtr) => ld.MusicURL = xtr.ReadElementString("MusicURL")); | 95 | "MusicURL", (ld, xtr) => ld.MusicURL = xtr.ReadElementString("MusicURL")); |
96 | m_ldProcessors.Add( | ||
97 | "OwnerID", (ld, xtr) => ld.OwnerID = UUID.Parse(xtr.ReadElementString("OwnerID"))); | ||
96 | 98 | ||
97 | m_ldProcessors.Add( | 99 | m_ldProcessors.Add( |
98 | "ParcelAccessList", ProcessParcelAccessList); | 100 | "ParcelAccessList", ProcessParcelAccessList); |
@@ -186,7 +188,16 @@ namespace OpenSim.Framework.Serialization.External | |||
186 | return landData; | 188 | return landData; |
187 | } | 189 | } |
188 | 190 | ||
189 | public static string Serialize(LandData landData) | 191 | /// <summary> |
192 | /// Serialize land data | ||
193 | /// </summary> | ||
194 | /// <param name='landData'></param> | ||
195 | /// <param name='options'> | ||
196 | /// Serialization options. | ||
197 | /// Can be null if there are no options. | ||
198 | /// "wipe-owners" will write UUID.Zero rather than the ownerID so that a later reload loads all parcels with the estate owner as the owner | ||
199 | /// </param> | ||
200 | public static string Serialize(LandData landData, Dictionary<string, object> options) | ||
190 | { | 201 | { |
191 | StringWriter sw = new StringWriter(); | 202 | StringWriter sw = new StringWriter(); |
192 | XmlTextWriter xtw = new XmlTextWriter(sw); | 203 | XmlTextWriter xtw = new XmlTextWriter(sw); |
@@ -215,7 +226,14 @@ namespace OpenSim.Framework.Serialization.External | |||
215 | xtw.WriteElementString("MediaID", landData.MediaID.ToString()); | 226 | xtw.WriteElementString("MediaID", landData.MediaID.ToString()); |
216 | xtw.WriteElementString("MediaURL", landData.MediaURL); | 227 | xtw.WriteElementString("MediaURL", landData.MediaURL); |
217 | xtw.WriteElementString("MusicURL", landData.MusicURL); | 228 | xtw.WriteElementString("MusicURL", landData.MusicURL); |
218 | xtw.WriteElementString("OwnerID", landData.OwnerID.ToString()); | 229 | |
230 | UUID ownerIdToWrite; | ||
231 | if (options != null && options.ContainsKey("wipe-owners")) | ||
232 | ownerIdToWrite = UUID.Zero; | ||
233 | else | ||
234 | ownerIdToWrite = landData.OwnerID; | ||
235 | |||
236 | xtw.WriteElementString("OwnerID", ownerIdToWrite.ToString()); | ||
219 | 237 | ||
220 | xtw.WriteStartElement("ParcelAccessList"); | 238 | xtw.WriteStartElement("ParcelAccessList"); |
221 | foreach (LandAccessEntry pal in landData.ParcelAccessList) | 239 | foreach (LandAccessEntry pal in landData.ParcelAccessList) |