ModernUO/Projects/UOContent/Engines/Quests/Core/QuestRestartInfo.cs
2020-09-13 21:49:46 -07:00

35 lines
821 B
C#

using System;
namespace Server.Engines.Quests
{
public class QuestRestartInfo
{
public QuestRestartInfo(Type questType, TimeSpan restartDelay)
{
QuestType = questType;
Reset(restartDelay);
}
public QuestRestartInfo(Type questType, DateTime restartTime)
{
QuestType = questType;
RestartTime = restartTime;
}
public Type QuestType { get; set; }
public DateTime RestartTime { get; set; }
public void Reset(TimeSpan restartDelay)
{
if (restartDelay < TimeSpan.MaxValue)
{
RestartTime = DateTime.UtcNow + restartDelay;
}
else
{
RestartTime = DateTime.MaxValue;
}
}
}
}