Jump to content

[Patch][8022] Explosive Shot (damage+tick fix)


Recommended Posts

Posted

Please bare with me as this is my first attempt at fixing a spell :).

This should fix the spell for patch 3.0.9 (see Wowhead).

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 1c3cf83..57432af 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4219,7 +4219,7 @@ void Aura::HandleAuraPeriodicDummy(bool apply, bool Real)
        {
            // Explosive Shot
            if (apply && !loading && caster)
-                m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 8 / 100);
+                m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 14 / 100);
            break;
        }
    }
@@ -6503,15 +6503,7 @@ void Aura::PeriodicDummyTick()
            {
                if (!caster)
                    return;
-                int32 damage = m_modifier.m_amount;
-                // Full damage to target at 0 tick
-                if (m_duration > m_modifier.periodictime)
-                {
-                    caster->CastCustomSpell(m_target, 53352, &damage, NULL, NULL, true, NULL, this);
-                    return;
-                }
-                damage/=4;
-                caster->CastCustomSpell(m_target, 56298, &damage, NULL, NULL, true, NULL, this);
+                m_target->CastCustomSpell(m_target, 53352, &m_modifier.m_amount, 0, 0, true, 0, this);
                return;
            }
            switch (spell->Id)

In 3.0.9, the spell now simply ticks 3 times and deals same damage every time. Also, it does (Ranged Attack Power / 0.20) in 3.0.9.

EDIT: Updated with proper spell ID and removed unneeded damage cut.

EDIT 2: Tested and confirmed working.

EDIT 3: Corrected formula. Should be: RAP * 0.2 + M1 to RAP * 0.2 + M2. Also made m_target cast the spell to try to fix LoS issues.

Thanks to Lightguard.

Posted

... Or that no one commented it.

Anyway, I got that formula from 3.0.9 Spell.dbc. You can check yourself.

Also, I just tested this again -- still seems to work fine.

But, in any case, now that master is at 3.1.3, the damage is incorrect. I will have a new diff ready for you in a few hours.

Posted
Also made m_target cast the spell to try to fix LoS issues.
This is ok for DoT damage but in like cases better provided last arg: caster guid for proper log output.

With this small change and removed caster pointer check in [8022]. Thank you :)

×
×
  • 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