초기커밋
This commit is contained in:
35
GameServer/Contents/Quest/QuestChecker/QuestInstance.cs
Normal file
35
GameServer/Contents/Quest/QuestChecker/QuestInstance.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using GameServer;
|
||||
using ServerCommon;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
public class QuestInstance : QuestBase
|
||||
{
|
||||
public QuestInstance(EQuestEventTargetType targetType, EQuestEventNameType eventNameType, int landId, int floorId) : base(targetType, eventNameType, 0, string.Empty, string.Empty, string.Empty)
|
||||
{
|
||||
m_condition_1 = landId.ToString();
|
||||
m_condition_2 = floorId.ToString();
|
||||
}
|
||||
|
||||
public override bool checkSubValidTaskScript(QuestAttribute questAttribute, QuestEventInfo events)
|
||||
{
|
||||
switch (m_name_type)
|
||||
{
|
||||
case EQuestEventNameType.ENTERED:
|
||||
if (events.EventCondition1.Equals(m_condition_1) && events.EventCondition2.Equals(m_condition_2)) return true;
|
||||
break;
|
||||
case EQuestEventNameType.EXITED:
|
||||
if (events.EventCondition2.Equals(m_condition_2)) return true;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override async Task<Result> postProcess(Player player, QuestTaskUpdateHandler questTaskUpdateHandler)
|
||||
{
|
||||
return await QuestNotifyHelper.sendRedisQuestNotifyRequest(player, questTaskUpdateHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user