Example #1
0
        public override void UpdateSpell()
        {
            healBonus = (1f + stats.BonusHealingDoneMultiplier)
                        * (1f + PriestInformation.GetTwinDisciplines(character.PriestTalents.TwinDisciplines))
                        * (1f + PriestInformation.GetImprovedRenew(character.PriestTalents.ImprovedRenew))
                        * (character.PriestTalents.GlyphofRenew ? 1.1f : 1.0f);

            base.UpdateSpell();

            float spellPowerBonus = stats.SpellPower * BaseOverTimeCoefficient;

            OverTimeHealHit  = (BaseOverTimeValue + spellPowerBonus) * healBonus;
            OverTimeHealCrit = OverTimeHealHit * CritMultiplier;
            OverTimeHealAvg  = OverTimeHealHit * (1f - CritChance) + OverTimeHealCrit * CritChance;
            float haste = (1f + stats.SpellHaste);

            OverTimeTickPeriod = BaseOverTimeTickPeriod / haste;
            // You get k more ticks for a hot/dot that has m ticks at 0% haste if your haste is higher than (2k-1)/2m.
            OverTimeTicks    = (float)Math.Floor(BaseOverTimeTicks * haste + 0.5f);
            OverTimeDuration = OverTimeTickPeriod * OverTimeTicks;
            HasOverTimeHeal  = true;

            if (character.PriestTalents.DivineAegis > 0)
            {
                float da = PriestInformation.GetDivineAegis(character.PriestTalents.DivineAegis) * (1f + stats.ShieldDiscipline);
                AbsorbMinCrit = AbsorbMaxCrit = AbsorbAvgCrit = OverTimeHealCrit * da;
                AbsorbAvg     = AbsorbAvgHit * (1f - CritChance) + AbsorbAvgCrit * CritChance;
                HasAbsorb     = true;
            }

            if (character.PriestTalents.DivineTouch > 0)
            {
                DirectHealMinHit  = DirectHealMaxHit = DirectHealAvgHit = OverTimeHealHit * OverTimeTicks;
                DirectHealMinCrit = DirectHealMaxCrit = DirectHealAvgCrit = OverTimeHealCrit * OverTimeTicks;
                DirectHealAvg     = DirectHealAvgHit * (1f - CritChance) + DirectHealAvgCrit * CritChance;
                HasDirectHeal     = true;
                if (stats.PriestSpec == ePriestSpec.Spec_Disc)
                {
                    DivineAegis();
                }
                else if (stats.PriestSpec == ePriestSpec.Spec_Holy)
                {
                    EchoOfLight();
                }
            }
        }