progress on -service.. no input, safe choices, etc
add Account.Inactive and Account.InactiveDuration refactor IsEligable to IsEligible
This commit is contained in:
parent
dd3c904944
commit
bff9e9abe4
9 changed files with 94 additions and 57 deletions
|
|
@ -18,6 +18,8 @@ namespace Server.Accounting
|
|||
{
|
||||
public static readonly TimeSpan YoungDuration = TimeSpan.FromHours( 40.0 );
|
||||
|
||||
private static readonly TimeSpan InactiveDuration = TimeSpan.FromDays( 180.0 );
|
||||
|
||||
private string m_Username, m_PlainPassword, m_CryptPassword, m_NewCryptPassword;
|
||||
private AccessLevel m_AccessLevel;
|
||||
private int m_Flags;
|
||||
|
|
@ -218,6 +220,14 @@ namespace Server.Accounting
|
|||
set { m_LastLogin = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An account is considered inactive based upon LastLogin and InactiveDuration
|
||||
/// </summary>
|
||||
public bool Inactive
|
||||
{
|
||||
get { return ( ( m_LastLogin + InactiveDuration ) <= DateTime.Now ); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total game time of this account, also considering the game time of characters
|
||||
/// that have been deleted.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue