MudEngine:
- BaseObject save code re-wrote - Added Inventory property to BaseCharacter - BaseCharacter Save() now called when players are being disconnected. - Adjusted how objects Filenames are generated.
This commit is contained in:
parent
2152a139b0
commit
e822537128
4 changed files with 28 additions and 6 deletions
|
@ -30,20 +30,27 @@ namespace MudEngine.GameObjects.Characters
|
|||
public Boolean IsControlled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets if this user has Admin privileges or not.
|
||||
/// Gets if this user has Admin privileges or not.
|
||||
/// </summary>
|
||||
public SecurityRoles Role { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets if this player is active.
|
||||
/// Gets or if this character is active.
|
||||
/// </summary>
|
||||
public Boolean IsActive { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current inventory of the character
|
||||
/// </summary>
|
||||
public Bag Inventory { get; private set; }
|
||||
|
||||
public BaseCharacter(Game game) : base(game)
|
||||
{
|
||||
ActiveGame = game;
|
||||
IsActive = false;
|
||||
CurrentRoom = game.InitialRealm.InitialZone.InitialRoom;
|
||||
Inventory = new Bag(game);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -129,6 +136,8 @@ namespace MudEngine.GameObjects.Characters
|
|||
internal void Clear()
|
||||
{
|
||||
// TODO: Save();
|
||||
Save();
|
||||
|
||||
IsActive = false;
|
||||
client.Close();
|
||||
// TODO: Reset game so it can be used again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue