Exemplo n.º 1
0
        private void PrepareQuestControl()
        {
            // QuestInfo
            questInfoCb.ItemsSource   = XmlKeyValue.FromXml("QuestInfo");
            questInfoCb.SelectedIndex = 0;

            // RewardXpDifficulty
            rewardXpCb.ItemsSource   = XmlKeyValue.FromXml("QuestXp");
            rewardXpCb.SelectedIndex = 0;
        }
 internal void PrepareCreaturePage()
 {
     PrepCb(rankCb, XmlKeyValue.FromXml("CreatureRank"));
     PrepCb(dmgSchoolCb, DamageType.GetDamageTypes());
     PrepCb(unitClassCb, XmlKeyValue.FromXml("UnitClass"));
     PrepCb(familyCb, CreatureFamily.GetCreatureFamilies());
     PrepCb(trainerCb, TrainerData.GetTrainerData());
     PrepCb(creatureTypeCb, XmlKeyValue.FromXml("CreatureType"));
     PrepCb(aiNameCb, XmlKeyValue.FromXml("AI"));
     PrepCb(movementCb, XmlKeyValue.FromXml("MovementType"));
 }
Exemplo n.º 3
0
        private void questInfoCb_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                XmlKeyValue       qi   = (XmlKeyValue)questInfoCb.SelectedValue;
                BitmaskStackPanel bmsp = (BitmaskStackPanel)questFlagsGb.Content;

                if (qi.Id == 88 || qi.Id == 89)
                {
                    bmsp.SetValueIsChecked(64, true);
                }
                else
                {
                    bmsp.SetValueIsChecked(64, false);
                }
            }
            catch { /*fail on load*/ }
        }
Exemplo n.º 4
0
        private void PrepareItemPage()
        {
            PreviewBox.Content = _preview;

            // Set class
            ItemClassCb.SelectedIndex = 0;

            // Set socket bonus
            SocketBonusCb.ItemsSource   = XmlKeyValue.FromXml("SocketBonus");
            SocketBonusCb.SelectedIndex = 0;

            // Set quality
            ItemQualityCb.ItemsSource   = ItemQuality.GetQualityList();
            ItemQualityCb.SelectedIndex = 0;

            // Set item bounds
            ItemBoundsCb.ItemsSource   = XmlKeyValue.FromXml("ItemBonding");
            ItemBoundsCb.SelectedIndex = 0;

            // Set weapon groupbox
            DamageTypeCb.ItemsSource   = DamageType.GetDamageTypes();
            DamageTypeCb.SelectedIndex = 0;

            // Set gemSockets groupbox
            _item.GemSockets.DynamicDataChanged += GemDataChangedHander;

            // set statsBox
            _item.Stats.DynamicDataChanged += StatsChangedHandler;

            // set resistance box
            _item.Resistances.DynamicDataChanged += ResistanceChangedHandler;

            // Race & class allowed
            _item.AllowedClass.BmspChanged += AllowedClass_BmspChanged;
            _item.AllowedRace.BmspChanged  += AllowedRace_BmspChanged;

            // show resistances in preview
            _item.Resistances.DynamicDataChanged += ResistanceChangedHandler;
        }