Server.Items.TreasureMap.LoadLocations C# (CSharp) Method

LoadLocations() private static method

private static LoadLocations ( ) : void
return void
		private static void LoadLocations()
		{
			string filePath = Path.Combine( Core.BaseDirectory, "Data/treasure.cfg" );

			List<Point2D> list = new List<Point2D>();
			List<Point2D> havenList = new List<Point2D>();

			if ( File.Exists( filePath ) )
			{
				using ( StreamReader ip = new StreamReader( filePath ) )
				{
					string line;

					while ( (line = ip.ReadLine()) != null )
					{
						try
						{
							string[] split = line.Split( ' ' );

							int x = Convert.ToInt32( split[0] ), y = Convert.ToInt32( split[1] );

							Point2D loc = new Point2D( x, y );
							list.Add( loc );

							if ( IsInHavenIsland( loc ) )
								havenList.Add( loc );
						}
						catch
						{
						}
					}
				}
			}

			m_Locations = list.ToArray();
			m_HavenLocations = havenList.ToArray();
		}