fix(Core/Spells): Spells that don't initiate combat shouldn't affect … (#25146)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Andrew 2026-03-21 00:59:38 -03:00 committed by GitHub
parent 7e984aa1de
commit f301aaea53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2887,16 +2887,9 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
if (!m_triggeredByAuraSpell.spellInfo || m_damage || (!(m_triggeredByAuraSpell.spellInfo->Effects[m_triggeredByAuraSpell.effectIndex].TriggerSpell == m_spellInfo->Id) && !(m_triggeredByAuraSpell.spellInfo->IsAuraEffectEqual(m_spellInfo))))
m_caster->AtTargetAttacked(effectUnit, !(m_spellInfo->HasAttribute(SPELL_ATTR1_NO_THREAT) || m_spellInfo->HasAttribute(SPELL_ATTR3_SUPPRESS_TARGET_PROCS)));
// Unsure if there are more spells that are not supposed to stop enemy from
// regenerating HP from food, so for now it stays as an ID.
const uint32 SPELL_PREMEDITATION = 14183;
if (m_spellInfo->Id != SPELL_PREMEDITATION)
{
if (!effectUnit->IsStandState())
{
effectUnit->SetStandState(UNIT_STAND_STATE_STAND);
}
}
// Spells that don't initiate combat shouldn't affect stand state (e.g. Premeditation, Storm Giant/Felreaver Passive)
if (m_spellInfo->HasInitialAggro() && !effectUnit->IsStandState())
effectUnit->SetStandState(UNIT_STAND_STATE_STAND);
}
}