Exemplo n.º 1
0
        public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations)
        {
            // First things first, we need to ensure that we aren't using bad data
            CharacterCalculationsShadowPriest calc = new CharacterCalculationsShadowPriest();

            if (character == null)
            {
                return(calc);
            }

            var stats = GetCharacterStats(character, additionalItem);

            var results = new Dictionary <string, string>();

            BaseCharacterStatCalculations baseCalculations = new BaseCharacterStatCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);

            baseCalculations.Calculate(results);


            stats.SpellPower += _calculationOptions.InnerFire ? 532 : 0;

            BurstCalculations burstCalculations = new BurstCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);

            burstCalculations.Calculate(results);

            calc.BurstPoints = burstCalculations.Points;

            foreach (KeyValuePair <string, string> keyValuePair in results)
            {
                calc.AddResult(keyValuePair.Key, keyValuePair.Value);
            }

            CalculationOptionsShadowPriest calcOpts = character.CalculationOptions as CalculationOptionsShadowPriest;

            if (calcOpts == null)
            {
                return(calc);
            }

            BossOptions bossOpts = character.BossOptions;

            calc.BasicStats     = stats;
            calc.LocalCharacter = character;

            Solver.solve(calc, calcOpts, bossOpts);

            return(calc);
        }
Exemplo n.º 2
0
        private string[] GetCharacterCalculationLabels()
        {
            List <string> labels = new List <string>();

            var calcLabels = new List <string>();

            var baseCalcs = new BaseCharacterStatCalculations();

            baseCalcs.GetLabels(calcLabels);

            foreach (string calcLabel in calcLabels)
            {
                labels.Add("Base Stats:" + calcLabel);
            }

            calcLabels.Clear();
            var burtsCalcs = new BurstCalculations();

            burtsCalcs.GetLabels(calcLabels);

            foreach (string calcLabel in calcLabels)
            {
                labels.Add("Burst Calculations:" + calcLabel);
            }

            var otherLabels = new[]
            {
                "Simulation:Rotation",
                "Simulation:Castlist",
                "Simulation:DPS",
                "Shadow:Vampiric Touch",
                "Shadow:SW Pain",
                "Shadow:Devouring Plague",
                "Shadow:Imp. Devouring Plague",
                "Shadow:SW Death",
                "Shadow:Mind Blast",
                "Shadow:Mind Flay",
                "Shadow:Shadowfiend",
                "Shadow:Mind Spike",
                "Holy:PW Shield",
            };

            labels.AddRange(otherLabels);

            return(labels.ToArray());
        }
        private string[] GetCharacterCalculationLabels()
        {
            List<string> labels = new List<string>();

            var calcLabels = new List<string>();

            var baseCalcs = new BaseCharacterStatCalculations();
            baseCalcs.GetLabels(calcLabels);

            foreach (string calcLabel in calcLabels)
            {
                labels.Add("Base Stats:" + calcLabel);
            }

            calcLabels.Clear();
            var burtsCalcs = new BurstCalculations();
            burtsCalcs.GetLabels(calcLabels);

            foreach (string calcLabel in calcLabels)
            {
                labels.Add("Burst Calculations:" + calcLabel);
            }

            var otherLabels = new[]
                                  {
                                      "Simulation:Rotation",
                                      "Simulation:Castlist",
                                      "Simulation:DPS",
                                      "Shadow:Vampiric Touch",
                                      "Shadow:SW Pain",
                                      "Shadow:Devouring Plague",
                                      "Shadow:Imp. Devouring Plague",
                                      "Shadow:SW Death",
                                      "Shadow:Mind Blast",
                                      "Shadow:Mind Flay",
                                      "Shadow:Shadowfiend",
                                      "Shadow:Mind Spike",
                                      "Holy:PW Shield",

                                  };

            labels.AddRange(otherLabels);

            return labels.ToArray();
        }
        public override CharacterCalculationsBase GetCharacterCalculations(Character character, Item additionalItem, bool referenceCalculation, bool significantChange, bool needsDisplayCalculations)
        {
            // First things first, we need to ensure that we aren't using bad data
            CharacterCalculationsShadowPriest calc = new CharacterCalculationsShadowPriest();
            if (character == null)
            {
                return calc;
            }

            var stats = GetCharacterStats(character, additionalItem);

            var results = new Dictionary<string, string>();

            BaseCharacterStatCalculations baseCalculations = new BaseCharacterStatCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);
            baseCalculations.Calculate(results);


            stats.SpellPower += _calculationOptions.InnerFire ? 532 : 0;

            BurstCalculations burstCalculations = new BurstCalculations(stats, _calculationOptions, character.BossOptions, character.PriestTalents);
            burstCalculations.Calculate(results);
            
            calc.BurstPoints = burstCalculations.Points;

            foreach (KeyValuePair<string, string> keyValuePair in results)
            {
                calc.AddResult(keyValuePair.Key, keyValuePair.Value);
            }

            CalculationOptionsShadowPriest calcOpts = character.CalculationOptions as CalculationOptionsShadowPriest;
            if (calcOpts == null)
            {
                return calc;
            }
            
            BossOptions bossOpts = character.BossOptions;

            calc.BasicStats = stats;
            calc.LocalCharacter = character;

            Solver.solve(calc, calcOpts, bossOpts);

            return calc;
        }