초기커밋
This commit is contained in:
38
GameServer/Contents/Quest/QuestChecker/QuestTimer.cs
Normal file
38
GameServer/Contents/Quest/QuestChecker/QuestTimer.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using GameServer;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using ServerCommon;
|
||||
using ServerCore; using ServerBase;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
public class QuestTimer : QuestBase
|
||||
{
|
||||
public QuestTimer(EQuestEventTargetType targetType, EQuestEventNameType eventNameType) : base(targetType, eventNameType, 0, string.Empty, string.Empty, string.Empty)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool checkSubValidTaskScript(QuestAttribute questAttribute, QuestEventInfo events)
|
||||
{
|
||||
DateTime nowDt = DateTimeHelper.Current;
|
||||
|
||||
if (questAttribute.TimerCompleteTime <= nowDt)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override async Task<Result> postProcess(Player player, QuestTaskUpdateHandler questTaskUpdateHandler)
|
||||
{
|
||||
await Task.CompletedTask;
|
||||
|
||||
if (player is not null)
|
||||
{
|
||||
QuestManager.It.m_timer_check_users.TryRemove(player.getUserGuid(), out _);
|
||||
}
|
||||
|
||||
return new();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user