예제 #1
0
 private void InitialCheck()
 {
     if (QuestTracker.GetActiveModel(_questModelId) != null || QuestTracker.IsModelIdComplete(_questModelId))
     {
         CallDeferred(nameof(Trigger));
     }
 }
예제 #2
0
        public QuestModel GetAssociatedQuestModel()
        {
            var parent = GetParentOrNull <DialogueItem>();

            if (parent == null)
            {
                return(null);
            }

            return(QuestTracker.GetActiveModel(parent.ActiveQuestModelId));
        }
예제 #3
0
        public bool IsValid()
        {
            var valid = true;

            if (!string.IsNullOrEmpty(ActiveQuestModelId))
            {
                valid = valid && QuestTracker.GetActiveModel(ActiveQuestModelId) != null;
            }
            if (RequiredCompletedQuestIds != null)
            {
                valid = valid && RequiredCompletedQuestIds.All(x => QuestTracker.IsQuestCompleted(x));
            }
            if (HasQuestStarter())
            {
                valid = valid && HasAvailableQuest();
            }
            return(valid);
        }