[8133] Do not scale with level damage for SPELL_AURA_MOD_DECREASE_SPEED.

May be other auras will need to be excluded also (auras modify AP,
Armor ...) but this one is the most annoying :)

This commit should fix non-movable behavior after being hitted by some
NPC spell with slowing effect.

Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
ApoC 2009-07-06 03:26:13 +02:00
parent ac051d10e9
commit 08f1c95874
2 changed files with 3 additions and 2 deletions

View file

@ -9796,7 +9796,8 @@ 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)
spellProto->Effect[effect_index] != SPELL_EFFECT_KNOCK_BACK &&
(spellProto->Effect[effect_index] != SPELL_EFFECT_APPLY_AURA || spellProto->EffectApplyAuraName[effect_index] != SPELL_AURA_MOD_DECREASE_SPEED))
value = int32(value*0.25f*exp(getLevel()*(70-spellProto->spellLevel)/1000.0f));
return value;