mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[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:
parent
f157b101fb
commit
e2fe17034a
3 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue