Fix typo in spell block chance calc

Signed-off-by: pasdVn <pasdVn@getmangos.com>
This commit is contained in:
pasdVn 2009-03-28 13:33:01 +03:00
parent 6e9542ca16
commit fa63fc96f8

View file

@ -2287,8 +2287,8 @@ bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const *spellProto, WeaponAtt
((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_BLOCK )
return false;
float blockChance = GetUnitBlockChance();
blockChance += (GetWeaponSkillValue(attackType) - pVictim->GetMaxSkillValueForLevel() )*0.04;
float blockChance = pVictim->GetUnitBlockChance();
blockChance += (int32(GetWeaponSkillValue(attackType)) - int32(pVictim->GetMaxSkillValueForLevel()))*0.04f;
if (roll_chance_f(blockChance))
return true;
}