Permalink
Browse files

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

  • Loading branch information...
zgn1988 committed Dec 14, 2016
1 parent 00effe6 commit 6ad2f7a0e13104871fe9ebcd7e1643802de28d29
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/game/Unit.cpp
View
@@ -2552,7 +2552,8 @@ float Unit::CalculateLevelPenalty(SpellEntry 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;

0 comments on commit 6ad2f7a

Please sign in to comment.