From 3e70742e816cdc0de0fda35f3be9692efd626fc8 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 24 Jul 2011 06:22:53 +0700 Subject: Core/Units: Prevent dodge/parry/block while under the effects of fear or desorientation --- src/server/game/Entities/Unit/Unit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index b61d3b825f0..5207e85ad63 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2652,7 +2652,7 @@ uint32 Unit::GetDefenseSkillValue(Unit const* target) const float Unit::GetUnitDodgeChance() const { - if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_STUNNED)) + if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_CONTROLLED)) return 0.0f; if (GetTypeId() == TYPEID_PLAYER) @@ -2672,7 +2672,7 @@ float Unit::GetUnitDodgeChance() const float Unit::GetUnitParryChance() const { - if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_STUNNED)) + if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_CONTROLLED)) return 0.0f; float chance = 0.0f; @@ -2703,7 +2703,7 @@ float Unit::GetUnitParryChance() const float Unit::GetUnitBlockChance() const { - if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_STUNNED)) + if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_CONTROLLED)) return 0.0f; if (Player const* player = ToPlayer()) -- cgit v1.2.3