public Quest(Character owner, QuestStepTemplate step) { m_record = new QuestRecord() { Finished = false, QuestId = step.QuestId, StepId = step.Id, }; CurrentStep = new QuestStep(this, step); }
public QuestStep(Quest quest, QuestStepTemplate template) { Quest = quest; Template = template; Objectives = template.Objectives.Select(x => x.GenerateObjective()).ToArray(); foreach (var objective in Objectives) { if (!objective.Finished) { objective.Completed += OnObjectiveCompleted; objective.EnableObjective(); } } }
public void ChangeQuestStep(QuestStepTemplate step) { CurrentStep?.CancelQuest(); CurrentStep = new QuestStep(this, step); }