hermes-socket-library/Quests/ChatterQuestProgression.cs

33 lines
806 B
C#
Raw Permalink Normal View History

2024-06-24 18:31:45 -04:00
namespace HermesSocketLibrary.Quests
{
public class ChatterQuestProgression
{
private readonly long _chatterId;
private readonly Quest _quest;
private int _counter;
public Quest Quest { get => _quest; }
public int Counter { get => _counter; }
public ChatterQuestProgression(long chatterId, Quest quest)
{
_chatterId = chatterId;
_quest = quest;
_counter = 0;
}
public bool Process(string message, HashSet<string> emotes)
{
bool good = _quest.Task.Process(_chatterId, message, emotes);
if (good)
{
_counter++;
return _quest.Task.IsCompleted(_counter);
}
return false;
}
}
}