mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
Core/Unit: fix the 1/10000 chance to miss with 100% chance
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user