protected override void LoadCalculationOptions()
        {
            if (Character.CalculationOptions == null)
            {
                Character.CalculationOptions = CalculationOptionsWarlock.MakeDefaultOptions();
            }
            _options = (CalculationOptionsWarlock)Character.CalculationOptions;
            ++_ignoreCount;

            // options tab
            petCombo.SelectedItem    = _options.Pet;
            imbueCombo.SelectedItem  = _options.Imbue;
            targetLevelCombo.Text    = _options.TargetLevel.ToString();
            fightLengthSpinner.Value = (decimal)_options.Duration;
            latencySpinner.Value     = (decimal)_options.Latency * 1000;
            thirtyFiveSpinner.Value  = (decimal)_options.ThirtyFive * 100;
            twentyFiveSpinner.Value  = (decimal)_options.TwentyFive * 100;
            RefreshRotationPanel();

            // raid buff tab
            raidSPSpinner.Value       = (decimal)_options.PerSP;
            raidTotemCheckbox.Checked = _options.ConvertTotem;
            raidTotemSpinner.Value    = (decimal)_options.PerFlametongue;
            raidMagicSpinner.Value    = (decimal)_options.PerMagicBuff;
            raidCritSpinner.Value     = (decimal)_options.PerCritBuff;
            raidIntSpinner.Value      = (decimal)_options.PerInt;
            raidSpiSpinner.Value      = (decimal)_options.PerSpi;
            raidHealthSpinner.Value   = (decimal)_options.PerHealth;

            // debug tab
            procCheckbox.Checked = _options.NoProcs;

            --_ignoreCount;
        }
Ejemplo n.º 2
0
        /// <param name="stats">
        /// This should already have buffStats factored in.
        /// </param>
        public CharacterCalculationsWarlock(
            Character character, Stats stats, Stats petBuffs)
        {
            Character = character;
            Options   = (CalculationOptionsWarlock)character.CalculationOptions;
            if (Options == null)
            {
                Options = CalculationOptionsWarlock.MakeDefaultOptions();
            }
            Talents      = character.WarlockTalents;
            Stats        = stats;
            PreProcStats = Stats.Clone();
            PetBuffs     = petBuffs;
            BaseMana     = BaseStats.GetBaseStats(character).Mana;
            Spells       = new Dictionary <string, Spell>();
            CastSpells   = new Dictionary <string, Spell>();
            HitChance
                = Math.Min(
                      1f,
                      Options.GetBaseHitRate() / 100f + CalcSpellHit());

            if (!Options.Pet.Equals("None") &&
                (Talents.SummonFelguard > 0 ||
                 !Options.Pet.Equals("Felguard")))
            {
                Type type = Type.GetType("Rawr.Warlock." + Options.Pet);
                Pet = (Pet)Activator.CreateInstance(
                    type, new object[] { this });
            }

            float personalDps = CalcPersonalDps();
            float petDps      = CalcPetDps();
            float raidBuff    = CalcRaidBuff();

            SubPoints     = new float[] { personalDps, petDps, raidBuff };
            OverallPoints = personalDps + petDps + raidBuff;
        }