fix(Core/Spells): make HoTs healing-done pct dynamic (#25357)

This commit is contained in:
sogladev 2026-04-12 16:59:30 +02:00 committed by GitHub
parent 6c7cca1871
commit ea2f6236d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 6 deletions

View file

@ -9459,12 +9459,12 @@ uint32 Unit::SpellCriticalHealingBonus(Unit const* caster, SpellInfo const* spel
return damage;
}
float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, DamageEffectType damagetype)
float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, DamageEffectType damagetype, bool includeHealingDonePct)
{
// For totems get healing bonus from owner (statue isn't totem in fact)
if (IsCreature() && IsTotem())
if (Unit* owner = GetOwner())
return owner->SpellPctHealingModsDone(victim, spellProto, damagetype);
return owner->SpellPctHealingModsDone(victim, spellProto, damagetype, includeHealingDonePct);
// Some spells don't benefit from done mods
if (spellProto->HasAttribute(SPELL_ATTR3_IGNORE_CASTER_MODIFIERS))
@ -9481,7 +9481,8 @@ float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, D
float DoneTotalMod = 1.0f;
// Healing done percent
DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
if (includeHealingDonePct)
DoneTotalMod *= GetTotalAuraMultiplier(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
// done scripted mod (take it from owner)
Unit* owner = GetOwner() ? GetOwner() : this;