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

--HG--
branch : trunk
This commit is contained in:
QAston
2009-08-01 02:47:58 +02:00
parent bf326cd3a3
commit 00724b0b4f
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -21399,7 +21399,7 @@ void Player::ResetMap()
GetMapRef().unlink();
}
void SetMap(Map * map)
void Player::SetMap(Map * map)
{
Unit::SetMap(map);
m_mapRef.link(map, this);
+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)