fix(Core/Spells): Next melee swing spells are supposed to be queued up even when out of range. (#7180)

- Closes #6588
This commit is contained in:
UltraNix
2021-08-06 03:07:36 +02:00
committed by GitHub
parent cf5aeaea06
commit 2d56a94016

View File

@@ -3244,10 +3244,14 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
triggeredByAura->GetBase()->SetDuration(0);
}
SendCastResult(result);
// Allows to cast melee attack spell if result is SPELL_FAILED_OUT_OF_RANGE
if (!IsNextMeleeSwingSpell() || result != SPELL_FAILED_OUT_OF_RANGE)
{
SendCastResult(result);
finish(false);
return result;
finish(false);
return result;
}
}
// Prepare data for triggers