[Core] Implement CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN [cz2664]

This commit is contained in:
fgreinus 2015-07-08 21:46:56 +01:00 committed by Antz
parent 93c77682bf
commit fa303fb829

View File

@ -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
if (damageInfo->TargetState == VICTIMSTATE_PARRY)
{
if (pVictim->GetTypeId() != TYPEID_UNIT ||
!(((Creature*)pVictim)->GetCreatureInfo()->ExtraFlags & CREATURE_EXTRA_FLAG_NO_PARRY_HASTEN))
{
// Get attack timers
float offtime = float(pVictim->getAttackTimer(OFF_ATTACK));
@ -1690,6 +1693,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss)
}
}
}
}
// Call default DealDamage
CleanDamage cleanDamage(damageInfo->cleanDamage, damageInfo->attackType, damageInfo->hitOutCome);