fix(Core/Spells): Fixed applying some proc ex flags to melee attacks. (#14254)

Fixes #14216
This commit is contained in:
UltraNix
2023-01-07 20:30:01 +01:00
committed by GitHub
parent 312c1eac3e
commit 9ba464a12b

View File

@@ -1698,6 +1698,7 @@ void Unit::CalculateMeleeDamage(Unit* victim, CalcDamageInfo* damageInfo, Weapon
if (fullBlockMask == ((1 << 0) | (1 << 1))) if (fullBlockMask == ((1 << 0) | (1 << 1)))
{ {
damageInfo->TargetState = VICTIMSTATE_BLOCKS; damageInfo->TargetState = VICTIMSTATE_BLOCKS;
damageInfo->procEx |= PROC_EX_FULL_BLOCK;
damageInfo->blocked_amount -= remainingBlock; damageInfo->blocked_amount -= remainingBlock;
} }
break; break;
@@ -1804,6 +1805,16 @@ void Unit::CalculateMeleeDamage(Unit* victim, CalcDamageInfo* damageInfo, Weapon
{ {
damageInfo->HitInfo |= (tmpHitInfo[0] & HITINFO_PARTIAL_RESIST); damageInfo->HitInfo |= (tmpHitInfo[0] & HITINFO_PARTIAL_RESIST);
} }
if (damageInfo->HitInfo & (HITINFO_PARTIAL_ABSORB | HITINFO_FULL_ABSORB))
{
damageInfo->procEx |= PROC_EX_ABSORB;
}
if (damageInfo->HitInfo & HITINFO_FULL_RESIST)
{
damageInfo->procEx |= PROC_EX_RESIST;
}
} }
void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)