From b5525b0c96a9f3466b3605c45a8222b37cf642ce Mon Sep 17 00:00:00 2001 From: megamage Date: Wed, 17 Dec 2008 23:44:11 -0600 Subject: [PATCH] *Fix calculation of level-based spell damage. --HG-- branch : trunk --- src/game/Unit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index ba88a341f9..7d996e3e7a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10471,7 +10471,9 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde if(spellProto->Attributes & SPELL_ATTR_LEVEL_DAMAGE_CALCULATION && spellProto->spellLevel && spellProto->Effect[effect_index] != SPELL_EFFECT_WEAPON_PERCENT_DAMAGE && spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK) - value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f)); + //there are many more: slow speed, -healing pct + //value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f)); + value = int32(value * getLevel() / (spellProto->spellLevel ? spellProto->spellLevel : 1)); return value; }