초기커밋
This commit is contained in:
36
GameServer/Contents/Quest/QuestChecker/QuestItem.cs
Normal file
36
GameServer/Contents/Quest/QuestChecker/QuestItem.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using ServerCommon;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace GameServer
|
||||
{
|
||||
public class QuestItem : QuestBase
|
||||
{
|
||||
List<int> m_item_ids = new List<int>();
|
||||
public QuestItem(EQuestEventTargetType targetType, EQuestEventNameType eventNameType, int itemId) : base(targetType, eventNameType, 0, string.Empty, string.Empty, string.Empty)
|
||||
{
|
||||
m_item_ids = new List<int>();
|
||||
m_item_ids.Add(itemId);
|
||||
}
|
||||
|
||||
public QuestItem(EQuestEventTargetType targetType, EQuestEventNameType eventNameType, List<int> itemIds) : base(targetType, eventNameType, 0, string.Empty, string.Empty, string.Empty)
|
||||
{
|
||||
m_item_ids = new List<int>();
|
||||
m_item_ids.AddRange(itemIds);
|
||||
}
|
||||
|
||||
|
||||
public override bool checkSubValidTaskScript(QuestAttribute questAttribute, QuestEventInfo events)
|
||||
{
|
||||
foreach (int itemId in m_item_ids)
|
||||
{
|
||||
if (events.EventCondition3.Equals(itemId.ToString())) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user