You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
using System.Diagnostics;
|
|
|
|
namespace Expedience.Models
|
|
{
|
|
public class CurrentDutyInfo
|
|
{
|
|
public CurrentDutyInfo(Stopwatch stopwatch)
|
|
{
|
|
_stopwatch = stopwatch;
|
|
StartTime = DateTime.UtcNow;
|
|
}
|
|
|
|
private Stopwatch _stopwatch;
|
|
public PlayerInfo Player { get; set; }
|
|
public int DutyId { get; set; }
|
|
public string DutyName { get; set; }
|
|
public List<GroupMemberInfo> PartyMembers { get; set; } = new();
|
|
public DateTime StartTime { get; }
|
|
public DateTime EndTime { get; private set; }
|
|
public bool IsUnrestricted { get; set; }
|
|
public bool HasNpcMembers { get; set; }
|
|
public bool HasEcho { get; set; }
|
|
|
|
public string DataCenter { get; set; }
|
|
public bool IsMinILevel { get; set; }
|
|
|
|
public void EndDuty()
|
|
{
|
|
_stopwatch.Stop();
|
|
EndTime = DateTime.UtcNow;
|
|
}
|
|
|
|
public TimeSpan GetDuration()
|
|
{
|
|
return _stopwatch.Elapsed;
|
|
}
|
|
}
|
|
}
|