Core/Creature: Implemented sparring with max health percent thresholds

Port From (https://github.com/TrinityCore/TrinityCore/commit/0750b7f8455df39a64462636ca296c6f2aa2b048)
This commit is contained in:
hondacrx
2023-04-25 08:38:55 -04:00
parent 9d4be0003b
commit bd2eb5baab
9 changed files with 138 additions and 3 deletions
+5
View File
@@ -8475,6 +8475,11 @@ 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);
caster.DealSpellDamage(damageInfo, true);
// Send log damage message to client