From e32f950be34107cc5f4c533b2506db30d01da371 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 3 Feb 2024 11:03:05 -0500 Subject: [PATCH] Core/Spell: Allow creatures with sparring active to damage themselves Port From (https://github.com/TrinityCore/TrinityCore/commit/2e4eecf96c616791707f9f1206eb4f8672b0e33f) --- Source/Game/Spells/Spell.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 056a6e681..9566c4ad6 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -8735,9 +8735,12 @@ namespace Game.Spells spell.m_damage = (int)damageInfo.damage; // sparring - Creature victimCreature = damageInfo.target.ToCreature(); - if (victimCreature != null) - damageInfo.damage = victimCreature.CalculateDamageForSparring(damageInfo.attacker, damageInfo.damage); + if (damageInfo.target != damageInfo.attacker) + { + Creature victimCreature = damageInfo.target.ToCreature(); + if (victimCreature != null) + damageInfo.damage = victimCreature.CalculateDamageForSparring(damageInfo.attacker, damageInfo.damage); + } caster.DealSpellDamage(damageInfo, true);