mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 03:53:48 +00:00
fix(Scripts/ZulGurub): Hakkar's Blood Siphon (#12196)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1241,7 +1241,7 @@ bool SpellInfo::IsChanneled() const
|
||||
return (AttributesEx & (SPELL_ATTR1_IS_CHANNELED | SPELL_ATTR1_IS_SELF_CHANNELED));
|
||||
}
|
||||
|
||||
bool SpellInfo::IsMoveAllowedChannel() const
|
||||
bool SpellInfo::IsActionAllowedChannel() const
|
||||
{
|
||||
return IsChanneled() && HasAttribute(SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL);
|
||||
}
|
||||
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
bool IsPositive() const;
|
||||
bool IsPositiveEffect(uint8 effIndex) const;
|
||||
bool IsChanneled() const;
|
||||
[[nodiscard]] bool IsMoveAllowedChannel() const;
|
||||
[[nodiscard]] bool IsActionAllowedChannel() const;
|
||||
bool NeedsComboPoints() const;
|
||||
bool IsBreakingStealth() const;
|
||||
bool IsRangedWeaponSpell() const;
|
||||
|
||||
@@ -4301,6 +4301,16 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
spellInfo->Effects[EFFECT_0].MiscValueB = 64;
|
||||
});
|
||||
|
||||
// Blood Siphon
|
||||
ApplySpellFix({ 24322, 24323 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_MOD_STUN;
|
||||
spellInfo->Effects[EFFECT_2].Effect = 0;
|
||||
spellInfo->Attributes |= SPELL_ATTR0_NO_AURA_CANCEL;
|
||||
spellInfo->AttributesEx5 |= SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL;
|
||||
spellInfo->ChannelInterruptFlags &= ~AURA_INTERRUPT_FLAG_MOVE;
|
||||
});
|
||||
|
||||
// Place Fake Fur
|
||||
ApplySpellFix({ 46085 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user