mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Fix typo in spell block chance calc
Signed-off-by: pasdVn <pasdVn@getmangos.com>
This commit is contained in:
parent
6e9542ca16
commit
fa63fc96f8
1 changed files with 2 additions and 2 deletions
|
|
@ -2287,8 +2287,8 @@ bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const *spellProto, WeaponAtt
|
||||||
((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_BLOCK )
|
((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_BLOCK )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
float blockChance = GetUnitBlockChance();
|
float blockChance = pVictim->GetUnitBlockChance();
|
||||||
blockChance += (GetWeaponSkillValue(attackType) - pVictim->GetMaxSkillValueForLevel() )*0.04;
|
blockChance += (int32(GetWeaponSkillValue(attackType)) - int32(pVictim->GetMaxSkillValueForLevel()))*0.04f;
|
||||||
if (roll_chance_f(blockChance))
|
if (roll_chance_f(blockChance))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue