v0.0.1-Alpha (#42)
This commit is contained in:
parent
d30f93c454
commit
a36796c2c1
3552 changed files with 2476 additions and 15223 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