fix(Core/Spells): Autoshot should not interrupt Volley (#9202)
- Closes #8883
This commit is contained in:
@@ -4679,7 +4679,7 @@ void Unit::RemoveNotOwnSingleTargetAuras()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
|
void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except, bool isAutoshot /*= false*/)
|
||||||
{
|
{
|
||||||
if (!(m_interruptMask & flag))
|
if (!(m_interruptMask & flag))
|
||||||
return;
|
return;
|
||||||
@@ -4700,10 +4700,16 @@ void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except)
|
|||||||
|
|
||||||
// interrupt channeled spell
|
// interrupt channeled spell
|
||||||
if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
|
if (Spell* spell = m_currentSpells[CURRENT_CHANNELED_SPELL])
|
||||||
if (spell->getState() == SPELL_STATE_CASTING
|
{
|
||||||
&& (spell->m_spellInfo->ChannelInterruptFlags & flag)
|
if (spell->getState() == SPELL_STATE_CASTING && (spell->m_spellInfo->ChannelInterruptFlags & flag) && spell->m_spellInfo->Id != except)
|
||||||
&& spell->m_spellInfo->Id != except)
|
{
|
||||||
InterruptNonMeleeSpells(false, spell->m_spellInfo->Id);
|
// Do not interrupt if auto shot
|
||||||
|
if (!(isAutoshot && spell->m_spellInfo->HasAttribute(SPELL_ATTR2_DO_NOT_RESET_COMBAT_TIMERS)))
|
||||||
|
{
|
||||||
|
InterruptNonMeleeSpells(false, spell->m_spellInfo->Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
UpdateInterruptMask();
|
UpdateInterruptMask();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2024,7 +2024,7 @@ public:
|
|||||||
void RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid);
|
void RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid);
|
||||||
void RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID = ObjectGuid::Empty, Aura* except = nullptr, bool negative = true, bool positive = true);
|
void RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID = ObjectGuid::Empty, Aura* except = nullptr, bool negative = true, bool positive = true);
|
||||||
void RemoveNotOwnSingleTargetAuras();
|
void RemoveNotOwnSingleTargetAuras();
|
||||||
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = 0);
|
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = 0, bool isAutoshot = false);
|
||||||
void RemoveAurasWithAttribute(uint32 flags);
|
void RemoveAurasWithAttribute(uint32 flags);
|
||||||
void RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, ObjectGuid casterGUID);
|
void RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, ObjectGuid casterGUID);
|
||||||
void RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode = AURA_REMOVE_BY_DEFAULT, uint32 except = 0);
|
void RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode = AURA_REMOVE_BY_DEFAULT, uint32 except = 0);
|
||||||
|
|||||||
@@ -3439,8 +3439,8 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
|||||||
// skip triggered spell (item equip spell casting and other not explicit character casts/item uses)
|
// skip triggered spell (item equip spell casting and other not explicit character casts/item uses)
|
||||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS) && m_spellInfo->IsBreakingStealth())
|
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS) && m_spellInfo->IsBreakingStealth())
|
||||||
{
|
{
|
||||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
|
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST, 0, m_spellInfo->Id == 75);
|
||||||
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_SPELL_ATTACK);
|
m_caster->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_SPELL_ATTACK, 0, m_spellInfo->Id == 75);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_caster->SetCurrentCastedSpell(this);
|
m_caster->SetCurrentCastedSpell(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user