fix(Core/Creature): Add support for CREATURE_FLAG_EXTRA_NO_PARRY_HAST… (#19927)
This commit is contained in:
parent
8d7463c670
commit
92ec34753f
1 changed files with 4 additions and 1 deletions
|
|
@ -1847,7 +1847,10 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
|||
if (damageInfo->blocked_amount && damageInfo->TargetState != VICTIMSTATE_BLOCKS)
|
||||
victim->HandleEmoteCommand(EMOTE_ONESHOT_PARRY_SHIELD);
|
||||
|
||||
if (damageInfo->TargetState == VICTIMSTATE_PARRY)
|
||||
// Parry haste is enabled if it's not a creature or if the creature doesn't have the NO_PARRY_HASTEN flag.
|
||||
bool isParryHasteEnabled = !victim->IsCreature() ||
|
||||
!victim->ToCreature()->GetCreatureTemplate()->HasFlagsExtra(CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN);
|
||||
if (damageInfo->TargetState == VICTIMSTATE_PARRY && isParryHasteEnabled)
|
||||
{
|
||||
// Get attack timers
|
||||
float offtime = float(victim->getAttackTimer(OFF_ATTACK));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue