mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Units: Units shouldn't be able to dodge while casting
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user