Jump to content

[fix][8941] Ferocious Bite


Guest xmolex

Recommended Posts

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ac22721..52b05b8 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -499,7 +499,6 @@ void Spell::EffectSchoolDMG(uint32 effect_idx)
                    float multiple = ap / 410 + m_spellInfo->DmgMultiplier[effect_idx];
                    damage += int32(m_caster->GetPower(POWER_ENERGY) * multiple);
                    damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
-                    m_caster->SetPower(POWER_ENERGY,0);
                }
                // Rake
                else if (m_spellInfo->SpellFamilyFlags & UI64LIT(0x0000000000001000) && m_spellInfo->Effect[2]==SPELL_EFFECT_ADD_COMBO_POINTS)

Ferocious Bite use all energy but should use only 35 energy.

Link to comment
Share on other sites

Finishing move that causes damage per combo point and converts each extra point of energy (up to a maximum of 30 extra energy) into X additional damage

So no, you can't just simply remove the energy reset. Check how much is left and set it to abs(current energy - 30). You'd need to modify the damage-Formula too

Link to comment
Share on other sites

Maybe something like:

float multiple = ap / 410 + m_spellInfo->DmgMultiplier[effect_idx];
if (m_caster->GetPower(POWER_ENERGY) >= 30) {
 damage += int32(30 * multiple);
 damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
 m_caster->SetPower(POWER_ENERGY, m_caster->GetPower(POWER_ENERGY) - 30);
}
else {
 damage += int32(m_caster->GetPower(POWER_ENERGY) * multiple);
 damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
 m_caster->SetPower(POWER_ENERGY, 0);
}

or

float multiple = ap / 410 + m_spellInfo->DmgMultiplier[effect_idx];
damage += int32(min(m_caster->GetPower(POWER_ENERGY), 30) * multiple);
damage += int32(((Player*)m_caster)->GetComboPoints() * ap * 7 / 100);
m_caster->SetPower(POWER_ENERGY, max(m_caster->GetPower(POWER_ENERGY) - 30, 0);

Link to comment
Share on other sites

the real thing...

What bug does the patch fix? What features does the patch add?

limits energy-conversion of Ferocious Bite to max 30 points

For which repository revision was the patch created?

master @ b9d2db3a3737ec795b34fb755851c0c65afd5999

Is there a thread in the bug report section or at lighthouse?

none..

Who has been writing this patch?

ah well ... dunno

Patch

[Download]

Link to comment
Share on other sites

  • 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