Core/Units: fixed a multiplier typo that was causing losing spell hit chance values when the victim has a lower level than the caster
This commit is contained in:
1 parent
c8e85c80b1
commit
e0f2d022e0
1 file changed
+2
-1
@@ -2665,13 +2665,14 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo
|
||||
else if (levelDifference < 0)
|
||||
{
|
||||
modHitChance -= MissChanceSpell[0];
|
||||
modHitChance += 1.0f * levelDifference;
|
||||
modHitChance += 1.0f * std::abs(levelDifference);
|
||||
}
|
||||
else if (levelDifference > 3)
|
||||
modHitChance -= MissChanceSpell[3] + lchance * (levelDifference - 3);
|
||||
|
||||
// Normalize chance
|
||||
modHitChance = std::max(0.0f, modHitChance);
|
||||
modHitChance = std::min(modHitChance, 100.0f);
|
||||
|
||||
// Spellmod from SPELLMOD_RESIST_MISS_CHANCE
|
||||
if (Player* modOwner = GetSpellModOwner())
|
||||
|
||||
Reference in new issue
Block a user