mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user