Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
31
Projects/Scripts/Engines/Quests/Core/QuestRestartInfo.cs
Normal file
31
Projects/Scripts/Engines/Quests/Core/QuestRestartInfo.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue