Core/Unit: fix the 1/10000 chance to miss with 100% chance

This commit is contained in:
mik1893
2016-08-03 18:29:33 +01:00
committed by Yehonal
parent 2aa3a463f0
commit 3679de3710

View File

@@ -2749,7 +2749,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spell)
int32 tmp = 10000 - HitChance;
int32 rand = irand(0, 10000);
int32 rand = irand(1, 10000); // Needs to be 1 to 10000 to avoid the 1/10000 chance to miss on 100% hit rating
if (rand < tmp)
return SPELL_MISS_MISS;