Core/Spell: fix one logic fail when calculating level penalty

(http://wow.gamepedia.com/index.php?title=Spell_power&oldid=1751770#Spells_learned_before_level_20)
This commit is contained in:
ariel-
2016-07-30 04:06:37 -03:00
parent ea9b44d749
commit c271e196c8

View File

@@ -2261,7 +2261,7 @@ float Unit::CalculateLevelPenalty(SpellInfo const* spellProto) const
float LvlPenalty = 0.0f;
if (spellProto->SpellLevel < 20)
LvlPenalty = 20.0f - spellProto->SpellLevel * 3.75f;
LvlPenalty = (20.0f - spellProto->SpellLevel) * 3.75f;
float LvlFactor = (float(spellProto->SpellLevel) + 6.0f) / float(getLevel());
if (LvlFactor > 1.0f)
LvlFactor = 1.0f;