From cc0940fe25bc4627ad0be47243992a4733ab43a8 Mon Sep 17 00:00:00 2001 From: Gildor Date: Sat, 7 Sep 2019 12:57:02 +0200 Subject: Core/Misc: Fix parry-haste mechanic. (#23773) * Should check victim that do a parry instead of the unit that deal the damage (Wrong implementation of this commit: 4a46fee03ef204289bbd96e8e1e07117b3bebd9f ) Closes #23754 (cherry picked from commit f8d7b260476c69e09ab0329cb7cd6c277f5473a7) --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index aa752d844fd..827d84aa2e1 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1366,7 +1366,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss) return; if (damageInfo->TargetState == VICTIMSTATE_PARRY && - (GetTypeId() != TYPEID_UNIT || (ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN) == 0)) + (victim->GetTypeId() != TYPEID_UNIT || (victim->ToCreature()->GetCreatureTemplate()->flags_extra & CREATURE_FLAG_EXTRA_NO_PARRY_HASTEN) == 0)) { // Get attack timers float offtime = float(victim->getAttackTimer(OFF_ATTACK)); -- cgit v1.2.3