aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
diff options
context:
space:
mode:
authorDan Lake2012-02-02 17:44:11 -0800
committerDan Lake2012-02-02 17:44:11 -0800
commit3257dbe76dff0a1e5842cafc75e4c2d09278deab (patch)
tree7f7d1a58ca910d8acefbd3bee0c3d096a59d8a43 /OpenSim/Framework/Serialization/External/LandDataSerializer.cs
parentObjectAddedToScene event should be fired when duplicating objects (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-3257dbe76dff0a1e5842cafc75e4c2d09278deab.zip
opensim-SC_OLD-3257dbe76dff0a1e5842cafc75e4c2d09278deab.tar.gz
opensim-SC_OLD-3257dbe76dff0a1e5842cafc75e4c2d09278deab.tar.bz2
opensim-SC_OLD-3257dbe76dff0a1e5842cafc75e4c2d09278deab.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Framework/Serialization/External/LandDataSerializer.cs')
-rw-r--r--OpenSim/Framework/Serialization/External/LandDataSerializer.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
index fc0387b..3ae9a8e 100644
--- a/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
+++ b/OpenSim/Framework/Serialization/External/LandDataSerializer.cs
@@ -90,7 +90,7 @@ namespace OpenSim.Framework.Serialization.External
90 landData.MusicURL = xtr.ReadElementString("MusicURL"); 90 landData.MusicURL = xtr.ReadElementString("MusicURL");
91 landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID")); 91 landData.OwnerID = UUID.Parse( xtr.ReadElementString("OwnerID"));
92 92
93 landData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 93 landData.ParcelAccessList = new List<LandAccessEntry>();
94 xtr.Read(); 94 xtr.Read();
95 if (xtr.Name != "ParcelAccessList") 95 if (xtr.Name != "ParcelAccessList")
96 throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name)); 96 throw new XmlException(String.Format("Expected \"ParcelAccessList\" element but got \"{0}\"", xtr.Name));
@@ -99,11 +99,14 @@ namespace OpenSim.Framework.Serialization.External
99 { 99 {
100 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement) 100 while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement)
101 { 101 {
102 ParcelManager.ParcelAccessEntry pae = new ParcelManager.ParcelAccessEntry(); 102 LandAccessEntry pae = new LandAccessEntry();
103 103
104 xtr.ReadStartElement("ParcelAccessEntry"); 104 xtr.ReadStartElement("ParcelAccessEntry");
105 pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID")); 105 pae.AgentID = UUID.Parse( xtr.ReadElementString("AgentID"));
106 pae.Time = Convert.ToDateTime( xtr.ReadElementString("Time")); 106 // We really don't care about temp vs perm here and this
107 // would break on old oars. Assume all bans are perm
108 xtr.ReadElementString("Time");
109 pae.Expires = 0; // Convert.ToUint( xtr.ReadElementString("Time"));
107 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList")); 110 pae.Flags = (AccessList)Convert.ToUInt32( xtr.ReadElementString("AccessList"));
108 xtr.ReadEndElement(); 111 xtr.ReadEndElement();
109 112
@@ -162,11 +165,11 @@ namespace OpenSim.Framework.Serialization.External
162 xtw.WriteElementString("OwnerID", landData.OwnerID.ToString()); 165 xtw.WriteElementString("OwnerID", landData.OwnerID.ToString());
163 166
164 xtw.WriteStartElement("ParcelAccessList"); 167 xtw.WriteStartElement("ParcelAccessList");
165 foreach (ParcelManager.ParcelAccessEntry pal in landData.ParcelAccessList) 168 foreach (LandAccessEntry pal in landData.ParcelAccessList)
166 { 169 {
167 xtw.WriteStartElement("ParcelAccessEntry"); 170 xtw.WriteStartElement("ParcelAccessEntry");
168 xtw.WriteElementString("AgentID", pal.AgentID.ToString()); 171 xtw.WriteElementString("AgentID", pal.AgentID.ToString());
169 xtw.WriteElementString("Time", pal.Time.ToString("s")); 172 xtw.WriteElementString("Time", pal.Expires.ToString());
170 xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags)); 173 xtw.WriteElementString("AccessList", Convert.ToString((uint)pal.Flags));
171 xtw.WriteEndElement(); 174 xtw.WriteEndElement();
172 } 175 }