fix(Core/Unit): Add previously unreferenced DealDamage script hook in Unit (#22207)

This commit is contained in:
Macs-Account
2025-07-03 09:41:30 -06:00
committed by GitHub
parent 7561147e7c
commit 0628ea53bb

View File

@@ -810,6 +810,7 @@ void Unit::DealDamageMods(Unit const* victim, uint32& damage, uint32* absorb)
uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage const* cleanDamage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask, SpellInfo const* spellProto, bool durabilityLoss, bool /*allowGM*/, Spell const* damageSpell /*= nullptr*/)
{
damage = sScriptMgr->DealDamage(attacker, victim, damage, damagetype);
// Xinef: initialize damage done for rage calculations
// Xinef: its rare to modify damage in hooks, however training dummy's sets damage to 0
uint32 rage_damage = damage + ((cleanDamage != nullptr) ? cleanDamage->absorbed_damage : 0);