Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

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