[Core] Implement CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN [cz2664]
This commit is contained in:
parent
93c77682bf
commit
fa303fb829
@ -1656,6 +1656,9 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
|||||||
|
|
||||||
// This seems to reduce the victims time until next attack if your attack was parried
|
// This seems to reduce the victims time until next attack if your attack was parried
|
||||||
if (damageInfo->TargetState == VICTIMSTATE_PARRY)
|
if (damageInfo->TargetState == VICTIMSTATE_PARRY)
|
||||||
|
{
|
||||||
|
if (pVictim->GetTypeId() != TYPEID_UNIT ||
|
||||||
|
!(((Creature*)pVictim)->GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_NO_PARRY_HASTEN))
|
||||||
{
|
{
|
||||||
// Get attack timers
|
// Get attack timers
|
||||||
float offtime = float(pVictim->getAttackTimer(OFF_ATTACK));
|
float offtime = float(pVictim->getAttackTimer(OFF_ATTACK));
|
||||||
@ -1690,6 +1693,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Call default DealDamage
|
// Call default DealDamage
|
||||||
CleanDamage cleanDamage(damageInfo->cleanDamage, damageInfo->attackType, damageInfo->hitOutCome);
|
CleanDamage cleanDamage(damageInfo->cleanDamage, damageInfo->attackType, damageInfo->hitOutCome);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user