Jump to content

[fix] judgement


Guest MrLama

Recommended Posts

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

Adds spellpower coefficient to generic judgement spell. (Cannot be handled trough database due to melee nature of spell)

For which repository revision was the patch created?

9765

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

---

Who has been writing this patch? Please include either forum user names or email addresses.

Me

Core

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index ccfe63a..21276c2 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -748,7 +748,10 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
                else if (m_spellInfo->Id == 54158)
                {
                    // [1 + 0.25 * SPH + 0.16 * AP]
-                    damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.16f);
+                    float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
+                    int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
+                                 m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget);
+                    damage += int32(ap * 0.16f) + int32(holy * 25 / 100);
                }
                break;
            }

DB

DELETE FROM spell_bonus_data WHERE entry = 54158;

Link to comment
Share on other sites

seems this patch is outdated after 9798.

i was tried to fix it by self, but it makes spell more buggy (does ubnormal amounts of damage)

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d629562..ac1725d 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -777,7 +777,10 @@ void Spell::EffectSchoolDMG(SpellEffectIndex effect_idx)
                else if (m_spellInfo->Id == 54158)
                {
                    // [1 + 0.25 * SPH + 0.16 * AP]
-                    damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.16f);
+                    float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
+                    int32 holy = m_caster->SpellBaseDamageBonusDone(GetSpellSchoolMask(m_spellInfo)) +
+                                 unitTarget->SpellBaseDamageBonusTaken(GetSpellSchoolMask(m_spellInfo));
+                    damage += int32(ap * 0.16f) + int32(holy * 25 / 100);
                }
                break;
            }

I still can't understand how to correctly update some patches after this commit :/

Any updates?

Link to comment
Share on other sites

Doesn't look like anything there can cause too high damage - BaseDamageBonus methods weren't changed much except rename and changing caller =\\ maybe something else screws it.

Edit: I've checked 54158 on my local with this patch, damage seems to be fine

Link to comment
Share on other sites

  • 2 months 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