fix(Core/Spells): do not attack focus target while charging (#7235)

- Closes #6721
This commit is contained in:
UltraNix 2021-08-07 12:32:56 +02:00 committed by GitHub
parent ecc9742b0f
commit d356767432
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5083,7 +5083,7 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
}
// not all charge effects used in negative spells
if (!m_spellInfo->IsPositive() && m_caster->GetTypeId() == TYPEID_PLAYER)
if (!m_spellInfo->IsPositive() && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->GetTarget() == unitTarget->GetGUID())
m_caster->Attack(unitTarget, true);
}
}