Core/Units: Allow autoattack if channelling with SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL

This commit is contained in:
Traesh authored and Ovahlord committed 2023-07-16 15:30:34 +02:00
1 parent b48e834b1c
commit ee8e20d81f
3 files changed
+13 -2

No files matched your search

+7
View File
@@ -1943,6 +1943,13 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
if (HasUnitState(UNIT_STATE_CANNOT_AUTOATTACK) || HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED))
return;
if (HasUnitState(UNIT_STATE_CASTING))
{
Spell* channeledSpell = GetCurrentSpell(CURRENT_CHANNELED_SPELL);
if (!channeledSpell || !channeledSpell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL))
return;
}
if (!victim->IsAlive())
return;