Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -4,40 +4,40 @@ using System.Xml;
|
|||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class LocationTree
|
||||
{
|
||||
public LocationTree( string fileName, Map map )
|
||||
{
|
||||
LastBranch = new Dictionary<Mobile, ParentNode>();
|
||||
Map = map;
|
||||
public class LocationTree
|
||||
{
|
||||
public LocationTree(string fileName, Map map)
|
||||
{
|
||||
LastBranch = new Dictionary<Mobile, ParentNode>();
|
||||
Map = map;
|
||||
|
||||
string path = Path.Combine( "Data/Locations/", fileName );
|
||||
string path = Path.Combine("Data/Locations/", fileName);
|
||||
|
||||
if ( File.Exists( path ) )
|
||||
{
|
||||
XmlTextReader xml = new XmlTextReader( new StreamReader( path ) );
|
||||
if (File.Exists(path))
|
||||
{
|
||||
XmlTextReader xml = new XmlTextReader(new StreamReader(path));
|
||||
|
||||
xml.WhitespaceHandling = WhitespaceHandling.None;
|
||||
xml.WhitespaceHandling = WhitespaceHandling.None;
|
||||
|
||||
Root = Parse( xml );
|
||||
Root = Parse(xml);
|
||||
|
||||
xml.Close();
|
||||
}
|
||||
}
|
||||
xml.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<Mobile, ParentNode> LastBranch { get; }
|
||||
public Dictionary<Mobile, ParentNode> LastBranch{ get; }
|
||||
|
||||
public Map Map { get; }
|
||||
public Map Map{ get; }
|
||||
|
||||
public ParentNode Root { get; }
|
||||
public ParentNode Root{ get; }
|
||||
|
||||
private ParentNode Parse( XmlTextReader xml )
|
||||
{
|
||||
xml.Read();
|
||||
xml.Read();
|
||||
xml.Read();
|
||||
private ParentNode Parse(XmlTextReader xml)
|
||||
{
|
||||
xml.Read();
|
||||
xml.Read();
|
||||
xml.Read();
|
||||
|
||||
return new ParentNode( xml, null );
|
||||
}
|
||||
}
|
||||
return new ParentNode(xml, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue