[9295] Implement SPELL_AURA_MOD_BLOCK_CRIT_CHANCE

This fixes talent 47294 and ranks

Signed-off-by: Lightguard <Lightguard@tauri.hu>
This commit is contained in:
Wowka321 2010-02-03 20:48:17 +01:00 committed by Lightguard
parent f157b101fb
commit e2fe17034a
3 changed files with 7 additions and 2 deletions

View file

@ -1457,6 +1457,11 @@ void Unit::CalculateMeleeDamage(Unit *pVictim, uint32 damage, CalcDamageInfo *da
damageInfo->HitInfo |= HITINFO_BLOCK;
damageInfo->procEx |= PROC_EX_BLOCK;
damageInfo->blocked_amount = damageInfo->target->GetShieldBlockValue();
// Target has a chance to double the blocked amount if it has SPELL_AURA_MOD_BLOCK_CRIT_CHANCE
if (roll_chance_i(pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_BLOCK_CRIT_CHANCE)))
damageInfo->blocked_amount *= 2;
if (damageInfo->blocked_amount >= damageInfo->damage)
{
damageInfo->TargetState = VICTIMSTATE_BLOCKS;