ModernUO/Projects/Scripts/Engines/Quests/Core/QuestRestartInfo.cs
2020-04-26 00:16:02 -07:00

31 lines
No EOL
692 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;
}
}
}