Core/Auras: Removed triggering aura effect from SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL handling (paladin Crusading Strikes combines this with a proc aura on another effect on the same spell)

This commit is contained in:
Shauren
2023-07-02 00:04:58 +02:00
parent 9e9f67d6bd
commit 36ecc2d8cb

View File

@@ -2123,15 +2123,11 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
victim = GetMeleeHitRedirectTarget(victim);
AuraEffectList const& meleeAttackOverrides = GetAuraEffectsByType(SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL);
AuraEffect const* meleeAttackAuraEffect = nullptr;
uint32 meleeAttackSpellId = 0;
if (attType == BASE_ATTACK)
{
if (!meleeAttackOverrides.empty())
{
meleeAttackAuraEffect = meleeAttackOverrides.front();
meleeAttackSpellId = meleeAttackAuraEffect->GetSpellEffectInfo().TriggerSpell;
}
meleeAttackSpellId = meleeAttackOverrides.front()->GetSpellEffectInfo().TriggerSpell;
}
else
{
@@ -2140,13 +2136,10 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
return aurEff->GetSpellEffectInfo().MiscValue != 0;
});
if (itr != meleeAttackOverrides.end())
{
meleeAttackAuraEffect = *itr;
meleeAttackSpellId = meleeAttackAuraEffect->GetSpellEffectInfo().MiscValue;
}
meleeAttackSpellId = (*itr)->GetSpellEffectInfo().MiscValue;
}
if (!meleeAttackAuraEffect)
if (!meleeAttackSpellId)
{
CalcDamageInfo damageInfo;
CalculateMeleeDamage(victim, &damageInfo, attType);
@@ -2174,7 +2167,7 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr
}
else
{
CastSpell(victim, meleeAttackSpellId, meleeAttackAuraEffect);
CastSpell(victim, meleeAttackSpellId, true);
uint32 hitInfo = HITINFO_AFFECTS_VICTIM | HITINFO_NO_ANIMATION;
if (attType == OFF_ATTACK)