MudEngine:

- BaseObject Saving and Loading fully implemented.
 - BaseCharacter Saving and Loading fully implemented.
 - Game.cs now contains SaveDataPaths property for allowing users to define where their data will be saved.
 -
This commit is contained in:
Scionwest_cp 2010-07-30 19:02:05 -07:00
parent 7f39821216
commit 4be5a831b1
8 changed files with 137 additions and 125 deletions

View file

@ -25,8 +25,13 @@ namespace MudEngine.Commands
{
if (player.Role == SecurityRoles.Admin)
{
string path = player.ActiveGame.DataPaths.Players;
for (int i = 0; i < player.ActiveGame.PlayerCollection.Length; i++)
player.ActiveGame.PlayerCollection[i].Save();
{
string filename = Path.Combine(path, player.ActiveGame.PlayerCollection[i].Filename);
player.ActiveGame.PlayerCollection[i].Save(filename);
}
player.ActiveGame.Server.EndServer();
player.ActiveGame.Server.Initialize(555, ref player.ActiveGame.PlayerCollection);
return new CommandResults("Server Restarted.");