muddesigner/MudEngine/Commands/CommandSave.cs
Scionwest_cp 607bd673a5 MudEngine:
- Sending messages to the client from the server is now an added feature. Use Game.SendMessage()
 - Added Load and Save commands for players.
 - Added Missing SaveDataPaths struct file.
2010-07-30 19:31:49 -07:00

29 lines
744 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using MudEngine.FileSystem;
using MudEngine.GameManagement;
using MudEngine.GameObjects;
using MudEngine.GameObjects.Characters;
namespace MudEngine.Commands
{
public class CommandSave : IGameCommand
{
public bool Override { get; set; }
public string Name { get; set; }
public CommandResults Execute(string command, BaseCharacter player)
{
string path = player.ActiveGame.DataPaths.Players;
string filename = Path.Combine(path, player.Filename);
player.Save(filename);
return new CommandResults();
}
}
}