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:
1 parent
6070d95b70
commit
d21eb7542a
1 file changed
+1
-1
@@ -2154,7 +2154,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;
|
||||
|
||||
Reference in new issue
Block a user