Core/Units: Units shouldn't be able to dodge while casting

This commit is contained in:
Machiavelli
2010-12-29 14:37:55 +01:00
parent 82f471cc13
commit 1f7e888465

View File

@@ -2840,8 +2840,9 @@ uint32 Unit::GetDefenseSkillValue(Unit const* target) const
float Unit::GetUnitDodgeChance() const
{
if (HasUnitState(UNIT_STAT_STUNNED))
if (IsNonMeleeSpellCasted(false) || HasUnitState(UNIT_STAT_STUNNED))
return 0.0f;
if (GetTypeId() == TYPEID_PLAYER)
return GetFloatValue(PLAYER_DODGE_PERCENTAGE);
else