hermes-socket-library/Quests/Tasks/MessageQuestTask.cs

30 lines
719 B
C#
Raw Permalink Normal View History

2024-06-24 18:31:45 -04:00
namespace HermesSocketLibrary.Quests.Tasks
{
public class MessageQuestTask : IQuestTask
{
public string Name => $"send {Target} messages";
public QuestType Type { get; set; }
public int Target { get; }
public MessageQuestTask(int target)
{
Target = target;
}
public bool IsCompleted(int counter)
{
return counter >= Target;
}
public bool Process(long chatterId, string message, HashSet<string> emotes)
{
if (string.IsNullOrWhiteSpace(message))
return false;
if (message.Length < 3)
return false;
return true;
}
}
}