*Check in spell block chance calc to prevent return unexpected value - by thenecromancer.

--HG--
branch : trunk
This commit is contained in:
QAston committed 2009-08-01 02:47:58 +02:00
1 parent bf326cd3a3
commit 00724b0b4f
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -2868,6 +2868,8 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
if (canBlock)
{
int32 blockChance = int32(pVictim->GetUnitBlockChance()*100.0f) - skillDiff * 4;
if ( blockChance < 0 )
blockChance = 0;
tmp += blockChance;
if (roll < tmp)