From fb7a095eb9cae72e973fb8e41658dd50c60f9747 Mon Sep 17 00:00:00 2001 From: Yaki Khadafi Date: Tue, 23 Oct 2012 11:45:45 +0300 Subject: [PATCH] [12304] Do not scale non-scalable effects Signed-off-by: Yaki Khadafi --- src/game/DBCStructure.h | 2 ++ src/game/Unit.cpp | 2 +- src/shared/revision_nr.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index 22e80ad9709..9b5c91e622c 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -1803,6 +1803,8 @@ struct SpellScalingEntry float coeff3[3]; // 11-13 float coefBase; // 14 some coefficient, mostly 1.0f uint32 coefLevelBase; // 15 some level + + bool IsScalableEffect(SpellEffectIndex i) const { return coeff1[i] != 0.0f; }; }; // SpellShapeshift.dbc diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 34496a46a1d..ba23d52370b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9296,7 +9296,7 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt SpellScalingEntry const* scalingEntry = spellProto->GetSpellScaling(); GtSpellScalingEntry const* gtScalingEntry = NULL; - if (scalingEntry) + if (scalingEntry && scalingEntry->IsScalableEffect(effect_index)) { if (target && IsAuraApplyEffect(spellProto, effect_index) && IsPositiveEffect(spellProto, effect_index)) level = target->getLevel(); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 21128ec8e45..f2b80899c54 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12303" + #define REVISION_NR "12304" #endif // __REVISION_NR_H__