* Added better commenting to the majority of the projects files. * Removed command support from the server console. * Added a Client side command STOP that can be used to shut down the server. In the future that will be specific to Admins only. * Characters now have their save code invoked during server shut down. * Server shut down code added. Server.Stop() fully implemented.
42 lines
969 B
C#
42 lines
969 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Xml.Linq;
|
|
using System.Reflection;
|
|
|
|
using MudEngine.GameScripts;
|
|
|
|
namespace MudEngine.DAL
|
|
{
|
|
public class XMLData
|
|
{
|
|
public XElement SaveData { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Instances the ObjectSaver and all of its Properties and Fields
|
|
/// </summary>
|
|
public XMLData(String objectType)
|
|
{
|
|
SaveData = new XElement(objectType);
|
|
}
|
|
|
|
public void AddSaveData(String property, String value)
|
|
{
|
|
this.SaveData.Add(new XElement(property, value));
|
|
}
|
|
|
|
public Boolean Save(String filename)
|
|
{
|
|
try
|
|
{
|
|
this.SaveData.Save(filename);
|
|
return true;
|
|
}
|
|
catch
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|