mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 18:10:26 +00:00
fix(Scripts/ZulGurub): Hakkar's Blood Siphon (#12196)
This commit is contained in:
@@ -3622,8 +3622,12 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
|
||||
{
|
||||
// generic spells always break channeled not delayed spells
|
||||
if (Spell* s = GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
||||
if (s->GetSpellInfo()->Id != 69051) // pussywizard: FoS, boss Devourer of Souls, Mirrored Soul, does not have any special attribute
|
||||
{
|
||||
if (!s->GetSpellInfo()->IsActionAllowedChannel())
|
||||
{
|
||||
InterruptSpell(CURRENT_CHANNELED_SPELL, false);
|
||||
}
|
||||
}
|
||||
|
||||
// autorepeat breaking
|
||||
if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL])
|
||||
@@ -3658,7 +3662,14 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
|
||||
if (pSpell->m_spellInfo->Id != 75)
|
||||
{
|
||||
// generic autorepeats break generic non-delayed and channeled non-delayed spells
|
||||
InterruptSpell(CURRENT_GENERIC_SPELL, false);
|
||||
if (Spell* s = GetCurrentSpell(CURRENT_CHANNELED_SPELL))
|
||||
{
|
||||
if (!s->GetSpellInfo()->IsActionAllowedChannel())
|
||||
{
|
||||
InterruptSpell(CURRENT_CHANNELED_SPELL, false);
|
||||
}
|
||||
}
|
||||
|
||||
InterruptSpell(CURRENT_CHANNELED_SPELL, false);
|
||||
}
|
||||
// special action: set first cast flag
|
||||
@@ -3793,7 +3804,7 @@ bool Unit::IsMovementPreventedByCasting() const
|
||||
{
|
||||
if (spell->getState() != SPELL_STATE_FINISHED && spell->IsChannelActive())
|
||||
{
|
||||
if (spell->GetSpellInfo()->IsMoveAllowedChannel())
|
||||
if (spell->GetSpellInfo()->IsActionAllowedChannel())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -3804,15 +3815,6 @@ bool Unit::IsMovementPreventedByCasting() const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Unit::CanMoveDuringChannel() const
|
||||
{
|
||||
if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
|
||||
if (spell->getState() != SPELL_STATE_FINISHED)
|
||||
return spell->GetSpellInfo()->HasAttribute(SPELL_ATTR5_ALLOW_ACTION_DURING_CHANNEL) && spell->IsChannelActive();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Unit::isInFrontInMap(Unit const* target, float distance, float arc) const
|
||||
{
|
||||
return IsWithinDistInMap(target, distance) && HasInArc(arc, target);
|
||||
|
||||
Reference in New Issue
Block a user