fix(Scripts/ZulGurub): Hakkar's Blood Siphon (#12196)

This commit is contained in:
UltraNix
2022-07-09 16:05:09 +02:00
committed by GitHub
parent 32ba21d029
commit 346150c92a
12 changed files with 90 additions and 44 deletions

View File

@@ -3555,9 +3555,13 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
// (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in)
if ((m_spellInfo->IsChanneled() || m_casttime) && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isMoving() && m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT && !IsTriggered())
{
SendCastResult(SPELL_FAILED_MOVING);
finish(false);
return SPELL_FAILED_MOVING;
// 1. Has casttime, 2. Or doesn't have flag to allow action during channel
if (m_casttime || !m_spellInfo->IsActionAllowedChannel())
{
SendCastResult(SPELL_FAILED_MOVING);
finish(false);
return SPELL_FAILED_MOVING;
}
}
// xinef: if spell have nearby target entry only, do not allow to cast if no targets are found