public override void Read(XmlNode os) { foreach (XmlNode current in XmlObject.GetChilds(os)) { switch (current.Name) { case "Id": this.Id = ReadInt(current); break; case "Delay": this.Delay = ReadFloat(current); break; case "MapName": this.MapName = ReadString(current); break; case "MapPath": this.MapPath = ReadString(current); break; case "AllowRide": this.AllowRide = ReadBool(current); break; case "AllowPK": this.AllowPK = ReadBool(current); break; case "AllowTrade": this.AllowTrade = ReadBool(current); break; case "AllowFight": this.AllowFight = ReadBool(current); break; case "Ally": this.Ally = new MapBorn(); this.Ally.Read(current); break; case "Enemy": this.Enemy = new MapBorn(); this.Enemy.Read(current); break; case "Neutral": this.Neutral = new MapBorn(); this.Neutral.Read(current); break; case "Barriers": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapBarrier data = new MapBarrier(); data.Read(pNode); this.Barriers.Add(data); }); break; case "Portals": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapPortal data = new MapPortal(); data.Read(pNode); this.Portals.Add(data); }); break; case "Regions": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapRegion data = ReadDynamicObject <MapRegion>(pNode); this.Regions.Add(data); }); break; case "MonsterGroups": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapMonsterGroup data = new MapMonsterGroup(); data.Read(pNode); this.MonsterGroups.Add(data); }); break; case "MineGroups": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapMineGroup data = new MapMineGroup(); data.Read(pNode); this.MineGroups.Add(data); }); break; case "WaveSets": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapWaveSet data = new MapWaveSet(); data.Read(pNode); this.WaveSets.Add(data); }); break; case "Npcs": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapNpc data = new MapNpc(); data.Read(pNode); this.Npcs.Add(data); }); break; } } }