fix(Core/Spells): Goblin Rocket Helmet should not cause auto-attack. (#15207)

This commit is contained in:
UltraNix
2023-03-04 21:39:05 +01:00
committed by GitHub
parent 0380360cc2
commit e3ed2e99e6

View File

@@ -4939,7 +4939,8 @@ void Spell::EffectCharge(SpellEffIndex /*effIndex*/)
m_caster->ToPlayer()->SetFallInformation(GameTime::GetGameTime().count(), m_caster->GetPositionZ());
ObjectGuid targetGUID = ObjectGuid::Empty;
if (!m_spellInfo->IsPositive() && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->GetTarget() == unitTarget->GetGUID())
if (!m_spellInfo->HasAttribute(SPELL_ATTR0_CANCELS_AUTO_ATTACK_COMBAT) && !m_spellInfo->IsPositive() && m_caster->GetTypeId() == TYPEID_PLAYER &&
m_caster->GetTarget() == unitTarget->GetGUID())
{
targetGUID = unitTarget->GetGUID();
}