From 36ecc2d8cb8d913a6ac0936031de47b18c69a90d Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 2 Jul 2023 00:04:58 +0200 Subject: 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) --- src/server/game/Entities/Unit/Unit.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 46b0f9bc681..63b8ad8f6c2 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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) -- cgit v1.2.3