Core/Units: Allow autoattack if channelling with SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL

Port From (https://github.com/TrinityCore/TrinityCore/commit/bbe7cba7f411977d756f6f697056aafb920a5b0a)
This commit is contained in:
hondacrx
2023-08-28 11:30:37 -04:00
parent 9227b1c622
commit b6b558f03a
3 changed files with 16 additions and 2 deletions
+7
View File
@@ -506,6 +506,13 @@ namespace Game.Entities
if (HasUnitState(UnitState.CannotAutoattack) && !extra)
return;
if (HasUnitState(UnitState.Casting))
{
Spell channeledSpell = GetCurrentSpell(CurrentSpellTypes.Channeled);
if (channeledSpell == null || !channeledSpell.GetSpellInfo().HasAttribute(SpellAttr5.AllowActionsDuringChannel))
return;
}
if (HasAuraType(AuraType.DisableAttackingExceptAbilities))
return;