Exemplo n.º 1
0
        public static float CalcPetMP5Buff(string pet, WarlockTalents talents, List <Buff> activeBuffs, CalculationOptionsWarlock options)
        {
            if (!pet.Equals("Felhunter"))
            {
                return(0f);
            }

            //spell ID 54424, effect ID 47203
            float SCALE = 0.7360000014f;

            return(StatUtils.GetBuffEffect(activeBuffs, SCALE * buffBaseValues[options.PlayerLevel - 80], "Mana Regeneration", s => s.Mp5));
        }
Exemplo n.º 2
0
        public static float CalcPetHealthBuff(string pet, WarlockTalents talents, List <Buff> activeBuffs, CalculationOptionsWarlock options)
        {
            if (!pet.Equals("Imp"))
            {
                return(0f);
            }

            //spell ID 6307, effect ID 2190
            float SCALE = 1.3200000525f;

            return(StatUtils.GetBuffEffect(activeBuffs, SCALE * buffBaseValues[options.PlayerLevel - 80], "Health", s => s.Health));
        }
Exemplo n.º 3
0
        public static float CalcPetHealthBuff(
            string pet, WarlockTalents talents, List <Buff> activeBuffs)
        {
            if (!pet.Equals("Imp"))
            {
                return(0f);
            }

            return(StatUtils.GetBuffEffect(
                       activeBuffs,
                       1330f * (1 + talents.ImprovedImp * .1f),
                       "Health",
                       s => s.Health));
        }
Exemplo n.º 4
0
        public static float CalcPetSpiBuff(
            string pet, WarlockTalents talents, List <Buff> activeBuffs)
        {
            if (!pet.Equals("Felhunter"))
            {
                return(0f);
            }

            return(StatUtils.GetBuffEffect(
                       activeBuffs,
                       64f * (1 + talents.ImprovedFelhunter * .05f),
                       "Spirit",
                       s => s.Spirit));
        }
Exemplo n.º 5
0
        public float GetPactProcBenefit()
        {
            float pact = .02f * Mommy.Talents.DemonicPact;

            if (pact == 0)
            {
                return(0f);
            }

            float buff
                = StatUtils.GetBuffEffect(
                      Mommy.Character.ActiveBuffs,
                      Mommy.CalcSpellPower() * pact,
                      "Spell Power",
                      s => s.SpellPower);

            if (buff == 0)
            {
                return(0f);
            }

            SpecialEffect pactEffect
                = new SpecialEffect(0, null, 45f, 20f);
            float meleeRate;

            if (BaseMeleeDamage == 0)
            {
                meleeRate = 0f;
            }
            else
            {
                meleeRate = 1 / CalcMeleeSpeed();
            }
            float spellRate;

            if (SpecialDamagePerSpellPower == 0)
            {
                spellRate = 0f;
                float specialSpeed = GetSpecialSpeed();
                if (specialSpeed > 0)
                {
                    meleeRate += 1 / GetSpecialSpeed();
                }
            }
            else
            {
                spellRate = 1 / GetSpecialSpeed();
            }
            float triggerRate = 1 / (meleeRate + spellRate);
            float uprate      = pactEffect.GetAverageUptime(
                triggerRate,
                Utilities.GetWeightedSum(
                    Mommy.HitChance * CalcSpellCrit(),
                    spellRate,
                    CalcMeleeCrit(),
                    meleeRate),
                triggerRate,
                Mommy.Options.Duration);

            return(uprate * buff);
        }