public QuestRelations(quest_template q)
 {
     InitializeComponent();
     _q = q;
     _CQuestStarter = DataProcessor.GetCreatureQuestStarter(q.ID);
     _CQuestEnder = DataProcessor.GetCreatureQuestEnder(q.ID);
     _GQuestStarter = DataProcessor.GetGoQuestStarter(q.ID);
     _GQuestEnder = DataProcessor.GetGoQuestEnder(q.ID);
     questGrid.DataContext = _q;
     npcStarter.ItemsSource = _CQuestStarter;
     npcEnder.ItemsSource = _CQuestEnder;
     goStarter.ItemsSource = _GQuestStarter;
     goEnder.ItemsSource = _GQuestEnder;
 }
        private void questList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            _Loading = true;
            quest_template q = questList.SelectedItem as quest_template;
            if (q == null)
            {
                _Quest = null;
                return;
            }
            else
            {
                _Quest = q;
                questTab.DataContext = _Quest;
            }

            LoadAddon(DataProcessor.LoadQuestAddon(q.ID));

            if (q.QuestSortID > 0)
            {
                radioZone.IsChecked = true;
                questZone.SelectedValue = q.QuestSortID;
                questZone.IsEnabled = true;
                questSort.SelectedValue = 0;
                questSort.IsEnabled = false;
            }
            else if (q.QuestSortID < 0)
            {
                radioSort.IsChecked = true;
                questSort.SelectedValue = -q.QuestSortID;
                questSort.IsEnabled = true;
                questZone.SelectedValue = 0;
                questZone.IsEnabled = false;
            }
            else
            {
                questSort.SelectedValue = 0;
                questZone.SelectedValue = 0;
                questSort.IsEnabled = false;
                questZone.IsEnabled = false;
            }
            _Loading = false;
        }
 public RaceSelector(quest_template q)
 {
     InitializeComponent();
     _q = q;
     CheckRace();
 }