33 lines
806 B
C#
33 lines
806 B
C#
|
|
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;
|
|
}
|
|
}
|
|
} |