diff options
author | Melanie | 2011-05-25 11:30:21 +0200 |
---|---|---|
committer | Melanie | 2011-05-25 11:30:21 +0200 |
commit | 932db1c3742415bd089620ca4eba9ed8ac857d85 (patch) | |
tree | 2114842fa576394adb1682771c9783f471f3c2f0 /OpenSim/Region/Framework/Scenes/Serialization | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC_OLD-932db1c3742415bd089620ca4eba9ed8ac857d85.zip opensim-SC_OLD-932db1c3742415bd089620ca4eba9ed8ac857d85.tar.gz opensim-SC_OLD-932db1c3742415bd089620ca4eba9ed8ac857d85.tar.bz2 opensim-SC_OLD-932db1c3742415bd089620ca4eba9ed8ac857d85.tar.xz |
Add PayPrice to serialization format Xml2
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 769d8a5..c42302f 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -341,6 +341,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
341 | m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); | 341 | m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); |
342 | m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation); | 342 | m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation); |
343 | m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem); | 343 | m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem); |
344 | m_SOPXmlProcessors.Add("PayPrice0", ProcessPayPrice0); | ||
345 | m_SOPXmlProcessors.Add("PayPrice1", ProcessPayPrice1); | ||
346 | m_SOPXmlProcessors.Add("PayPrice2", ProcessPayPrice2); | ||
347 | m_SOPXmlProcessors.Add("PayPrice3", ProcessPayPrice3); | ||
348 | m_SOPXmlProcessors.Add("PayPrice4", ProcessPayPrice4); | ||
344 | #endregion | 349 | #endregion |
345 | 350 | ||
346 | #region TaskInventoryXmlProcessors initialization | 351 | #region TaskInventoryXmlProcessors initialization |
@@ -698,6 +703,32 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
698 | { | 703 | { |
699 | obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); | 704 | obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); |
700 | } | 705 | } |
706 | |||
707 | private static void ProcessPayPrice0(SceneObjectPart obj, XmlTextReader reader) | ||
708 | { | ||
709 | obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty); | ||
710 | } | ||
711 | |||
712 | private static void ProcessPayPrice1(SceneObjectPart obj, XmlTextReader reader) | ||
713 | { | ||
714 | obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty); | ||
715 | } | ||
716 | |||
717 | private static void ProcessPayPrice2(SceneObjectPart obj, XmlTextReader reader) | ||
718 | { | ||
719 | obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty); | ||
720 | } | ||
721 | |||
722 | private static void ProcessPayPrice3(SceneObjectPart obj, XmlTextReader reader) | ||
723 | { | ||
724 | obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty); | ||
725 | } | ||
726 | |||
727 | private static void ProcessPayPrice4(SceneObjectPart obj, XmlTextReader reader) | ||
728 | { | ||
729 | obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); | ||
730 | } | ||
731 | |||
701 | #endregion | 732 | #endregion |
702 | 733 | ||
703 | #region TaskInventoryXmlProcessors | 734 | #region TaskInventoryXmlProcessors |
@@ -1069,7 +1100,6 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1069 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); | 1100 | shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); |
1070 | } | 1101 | } |
1071 | 1102 | ||
1072 | |||
1073 | #endregion | 1103 | #endregion |
1074 | 1104 | ||
1075 | ////////// Write ///////// | 1105 | ////////// Write ///////// |
@@ -1175,6 +1205,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1175 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); | 1205 | writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); |
1176 | WriteBytes(writer, "TextureAnimation", sop.TextureAnimation); | 1206 | WriteBytes(writer, "TextureAnimation", sop.TextureAnimation); |
1177 | WriteBytes(writer, "ParticleSystem", sop.ParticleSystem); | 1207 | WriteBytes(writer, "ParticleSystem", sop.ParticleSystem); |
1208 | writer.WriteElementString("PayPrice0", sop.PayPrice[0].ToString()); | ||
1209 | writer.WriteElementString("PayPrice1", sop.PayPrice[1].ToString()); | ||
1210 | writer.WriteElementString("PayPrice2", sop.PayPrice[2].ToString()); | ||
1211 | writer.WriteElementString("PayPrice3", sop.PayPrice[3].ToString()); | ||
1212 | writer.WriteElementString("PayPrice4", sop.PayPrice[4].ToString()); | ||
1178 | 1213 | ||
1179 | writer.WriteEndElement(); | 1214 | writer.WriteEndElement(); |
1180 | } | 1215 | } |