Ejemplo n.º 1
0
        private void SetupFormValues(QuestInProgressCondition condition)
        {
            cmbQuestInProgress.SelectedIndex = QuestBase.ListIndex(condition.QuestId);
            cmbTaskModifier.SelectedIndex    = (int)condition.Progress;
            if (cmbTaskModifier.SelectedIndex == -1)
            {
                cmbTaskModifier.SelectedIndex = 0;
            }

            if (cmbTaskModifier.SelectedIndex != 0)
            {
                //Get Quest Task Here
                var quest = QuestBase.Get(QuestBase.IdFromList(cmbQuestInProgress.SelectedIndex));
                if (quest != null)
                {
                    for (var i = 0; i < quest.Tasks.Count; i++)
                    {
                        if (quest.Tasks[i].Id == condition.TaskId)
                        {
                            cmbQuestTask.SelectedIndex = i;
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public static bool MeetsCondition(
     QuestInProgressCondition condition,
     Player player,
     Event eventInstance,
     QuestBase questBase
     )
 {
     return(player.QuestInProgress(condition.QuestId, condition.Progress, condition.TaskId));
 }
Ejemplo n.º 3
0
        public static bool MeetsCondition(
            QuestInProgressCondition condition,
            Player player,
            Event eventInstance,
            QuestBase questBase
            )
        {
            var questInProgress = QuestBase.Get(condition.QuestId);

            if (questInProgress != null)
            {
                return(player.QuestInProgress(questInProgress, condition.Progress, condition.TaskId));
            }

            return(false);
        }
Ejemplo n.º 4
0
 private void SaveFormValues(QuestInProgressCondition condition)
 {
     condition.QuestId  = QuestBase.IdFromList(cmbQuestInProgress.SelectedIndex);
     condition.Progress = (QuestProgressState)cmbTaskModifier.SelectedIndex;
     condition.TaskId   = Guid.Empty;
     if (cmbTaskModifier.SelectedIndex != 0)
     {
         //Get Quest Task Here
         var quest = QuestBase.Get(QuestBase.IdFromList(cmbQuestInProgress.SelectedIndex));
         if (quest != null)
         {
             if (cmbQuestTask.SelectedIndex > -1)
             {
                 condition.TaskId = quest.Tasks[cmbQuestTask.SelectedIndex].Id;
             }
         }
     }
 }