초기커밋
This commit is contained in:
37
GameServer/Contents/Quest/QuestChecker/QuestInteriroMode.cs
Normal file
37
GameServer/Contents/Quest/QuestChecker/QuestInteriroMode.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using ServerCommon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GameServer;
|
||||
|
||||
public class QuestInteriroMode : QuestBase
|
||||
{
|
||||
private Int32 m_count = 0;
|
||||
public QuestInteriroMode(EQuestEventTargetType targetType, EQuestEventNameType eventNameType, string typeName, int count) : base(targetType, eventNameType, 0, typeName, count.ToString(), string.Empty)
|
||||
{
|
||||
m_count = count;
|
||||
if (count == 0)
|
||||
{
|
||||
m_condition_2 = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool checkSubValidTaskScript(QuestAttribute questAttribute, QuestEventInfo events)
|
||||
{
|
||||
|
||||
if (false == events.EventCondition1.Equals(m_condition_1)) return false;
|
||||
if(events.EventCondition2.Equals(string.Empty)) return true;
|
||||
|
||||
if (false == int.TryParse(events.EventCondition2, out var cond2)) return false;
|
||||
if (cond2 > m_count) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override async Task<Result> postProcess(Player player, QuestTaskUpdateHandler questTaskUpdateHandler)
|
||||
{
|
||||
return await QuestNotifyHelper.sendRedisQuestNotifyRequest(player, questTaskUpdateHandler);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user