Skip to content

Commit

Permalink
[12304] Do not scale non-scalable effects
Browse files Browse the repository at this point in the history
Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
  • Loading branch information
Zakamurite committed Oct 23, 2012
1 parent 4d086c5 commit fb7a095
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/game/DBCStructure.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/game/Unit.cpp
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion 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__

0 comments on commit fb7a095

Please sign in to comment.