aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2019-09-07 12:57:02 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-18 21:45:45 +0100
commitcc0940fe25bc4627ad0be47243992a4733ab43a8 (patch)
tree3fefb104dce187ce51f32511eca0ca0a6ac2588e
parent4e487c35a77719461d254a56ce1992af4def2da7 (diff)
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)
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
1 files changed, 1 insertions, 1 deletions
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));