Пример #1
0
 public EventCommandCompleteQuestTask(CompleteQuestTaskCommand refCommand, FrmEvent editor)
 {
     InitializeComponent();
     mMyCommand   = refCommand;
     mEventEditor = editor;
     InitLocalization();
     cmbQuests.Items.Clear();
     cmbQuests.Items.AddRange(QuestBase.Names);
     cmbQuests.SelectedIndex = QuestBase.ListIndex(refCommand.QuestId);
 }
Пример #2
0
        private static string GetCommandText(CompleteQuestTaskCommand command, MapInstance map)
        {
            var quest = QuestBase.Get(command.QuestId);

            if (quest != null)
            {
                //Try to find task
                foreach (var task in quest.Tasks)
                {
                    if (task.Id == command.TaskId)
                    {
                        return(Strings.EventCommandList.completetask.ToString(
                                   QuestBase.GetName(command.QuestId), task.GetTaskString(Strings.TaskEditor.descriptions)
                                   ));
                    }
                }
            }

            return(Strings.EventCommandList.completetask.ToString(
                       QuestBase.GetName(command.QuestId), Strings.EventCommandList.taskundefined
                       ));
        }