From 7de6a839fa9373abb452d6ba8bcb3433a4daf42c Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 18 Jul 2023 07:37:11 -0400 Subject: [PATCH] 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) Port From (https://github.com/TrinityCore/TrinityCore/commit/36ecc2d8cb8d913a6ac0936031de47b18c69a90d) --- Source/Game/Entities/Unit/Unit.Combat.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Source/Game/Entities/Unit/Unit.Combat.cs b/Source/Game/Entities/Unit/Unit.Combat.cs index 69af93351..c8c09e6cf 100644 --- a/Source/Game/Entities/Unit/Unit.Combat.cs +++ b/Source/Game/Entities/Unit/Unit.Combat.cs @@ -534,15 +534,11 @@ namespace Game.Entities victim = GetMeleeHitRedirectTarget(victim); var meleeAttackOverrides = GetAuraEffectsByType(AuraType.OverrideAutoattackWithMeleeSpell); - AuraEffect meleeAttackAuraEffect = null; uint meleeAttackSpellId = 0; if (attType == WeaponAttackType.BaseAttack) { if (!meleeAttackOverrides.Empty()) - { - meleeAttackAuraEffect = meleeAttackOverrides.First(); - meleeAttackSpellId = meleeAttackAuraEffect.GetSpellEffectInfo().TriggerSpell; - } + meleeAttackSpellId = meleeAttackOverrides.First().GetSpellEffectInfo().TriggerSpell; } else { @@ -552,13 +548,10 @@ namespace Game.Entities }); if (auraEffect != null) - { - meleeAttackAuraEffect = auraEffect; - meleeAttackSpellId = (uint)meleeAttackAuraEffect.GetSpellEffectInfo().MiscValue; - } + meleeAttackSpellId = (uint)auraEffect.GetSpellEffectInfo().MiscValue; } - if (meleeAttackAuraEffect == null) + if (meleeAttackSpellId == 0) { CalcDamageInfo damageInfo; CalculateMeleeDamage(victim, out damageInfo, attType); @@ -586,7 +579,7 @@ namespace Game.Entities } else { - CastSpell(victim, meleeAttackSpellId, new CastSpellExtraArgs(meleeAttackAuraEffect)); + CastSpell(victim, meleeAttackSpellId, true); HitInfo hitInfo = HitInfo.AffectsVictim | HitInfo.NoAnimation; if (attType == WeaponAttackType.OffAttack)