fix(Core/Spells): make HoTs healing-done pct dynamic (#25357)
This commit is contained in:
parent
6c7cca1871
commit
ea2f6236d2
3 changed files with 11 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue