C# Class NetMud.DataAccess.FileSystem.PlayerData

Inheritance: FileAccessor
Datei anzeigen Open project: SwiftAusterity/NetMud Class Usage Examples

Public Methods

Method Description
ArchiveCharacter ( ICharacter entity ) : void

Archive a character

LoadAllCharactersForAccountToCache ( string accountHandle ) : bool

Dumps everything of a single type into the cache from the filesystem for BackingData

RestorePlayer ( string accountHandle, long charID ) : IPlayer

Restores one character from their Current backup

WriteCharacter ( ICharacter entity ) : void

Write one character to its player current data

WriteOnePlayer ( IPlayer entity ) : bool

Writes one player out to disk

Private Methods

Method Description
GetCharacterFilename ( ICharacter entity ) : string

Gets the statically formatted filename for a player

GetPlayerFilename ( IPlayer entity ) : string

Gets the statically formatted filename for a player

GetPlayerFilename ( long charId ) : string
WritePlayer ( DirectoryInfo dir, IPlayer entity ) : void

Writes one player out (and only one character) and their inventory to Current and archives whatever used to be Current

Method Details

ArchiveCharacter() public method

Archive a character
public ArchiveCharacter ( ICharacter entity ) : void
entity ICharacter the thing to archive
return void

LoadAllCharactersForAccountToCache() public method

Dumps everything of a single type into the cache from the filesystem for BackingData
public LoadAllCharactersForAccountToCache ( string accountHandle ) : bool
accountHandle string
return bool

RestorePlayer() public method

Restores one character from their Current backup
public RestorePlayer ( string accountHandle, long charID ) : IPlayer
accountHandle string Global Account Handle for the account
charID long Which character to load
return IPlayer

WriteCharacter() public method

Write one character to its player current data
public WriteCharacter ( ICharacter entity ) : void
entity ICharacter the char to write
return void

WriteOnePlayer() public method

Writes one player out to disk
public WriteOnePlayer ( IPlayer entity ) : bool
entity IPlayer
return bool