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)
This commit is contained in:
hondacrx
2023-07-18 07:37:11 -04:00
parent d20f904f1d
commit 7de6a839fa
+4 -11
View File
@@ -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)