fix: stop Classic Auto Shot after successful Scatter Shot

From KylRikul/TrinityCore, commit 5744e28093, by KylRikul (GPL-2.0). Thank you!
This commit is contained in:
Karrz1
2026-11-14 08:07:57 +00:00
parent 7d4fc187c2
commit bbeaa54280
+9
View File
@@ -4527,7 +4527,16 @@ void Spell::finish(SpellCastResult result)
// Stop Attack for some spells
if (m_spellInfo->HasAttribute(SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT))
{
unitCaster->AttackStop();
// Classic Scatter Shot must also stop Auto Shot. AttackStop only
// clears the melee victim, leaving the ranged autorepeat running.
if (m_spellInfo->Id == 19503 && m_spellInfo->HasAttribute(SPELL_ATTR15_UNK13)
&& m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && unitCaster->GetClass() == CLASS_HUNTER)
if (Spell const* autoShot = unitCaster->GetCurrentSpell(CURRENT_AUTOREPEAT_SPELL))
if (autoShot->GetSpellInfo()->Id == 75)
unitCaster->CancelAutoRepeatSpell();
}
}
template<class T>