Jump to content

[fix] conflagrate custom dmg. calc


pasdVn

Recommended Posts

  • * the hardcoded "4" does not fit in any case (neither immolate, nor shadowflame)
    * the dot damage also needs a custom calculation (don't know if this worked before the dmg calc. patch somehow!?)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index e6de009..0d2af4a 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -515,8 +515,14 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
                    // found Immolate or Shadowflame
                    if (aura)
                    {
-                        int32 damagetick = aura->GetModifier()->m_amount;
-                        damage += damagetick * 4;
+                        // get damage of dot aura
+                        int32 basepoints = aura->GetModifier()->m_amount;
+                        basepoints *= aura->GetAuraMaxDuration() / aura->GetModifier()->periodictime;
+
+                        // 60% of the dot aura damage is direct damage, value stored in basepoints of effect 1
+                        damage = basepoints * m_currentBasePoints[EFFECT_INDEX_1] / 100;
+                        // 40% of the dot aura damage is dot damage, value stored in basepoints of effect 2
+                        m_currentBasePoints[EFFECT_INDEX_1] = basepoints * m_currentBasePoints[EFFECT_INDEX_2] / (100 * GetSpellAuraMaxTicks(m_spellInfo));

                        // Glyph of Conflagrate
                        if (!m_caster->HasAura(56235))

Problem we still have with this and similar spells is, that they additionally get their 'own' bonuses applied in spelldamagebonusdone() as they are no DIRECT_DAMAGE. Maybe there exists an attribute or anything that we could use?

Link to comment
Share on other sites

  • 5 weeks later...
  • 2 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use