fix(Core/Spell): Halve healing threat generated by paladins (#22271)

This commit is contained in:
Tereneckla
2025-06-10 02:25:33 +00:00
committed by GitHub
parent 3a7705409c
commit 0afc258a6b
2 changed files with 16 additions and 4 deletions
@@ -6852,8 +6852,10 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
heal = uint32(caster->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT, GetBase()->GetStackAmount())); heal = uint32(caster->SpellHealingBonusTaken(caster, GetSpellInfo(), heal, DOT, GetBase()->GetStackAmount()));
HealInfo healInfo(caster, caster, heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask()); HealInfo healInfo(caster, caster, heal, GetSpellInfo(), GetSpellInfo()->GetSchoolMask());
int32 gain = caster->HealBySpell(healInfo); float threat = float(caster->HealBySpell(healInfo)) * 0.5f;
caster->getHostileRefMgr().threatAssist(caster, gain * 0.5f, GetSpellInfo()); if (caster->IsClass(CLASS_PALADIN))
threat *= 0.5f;
caster->getHostileRefMgr().threatAssist(caster, threat, GetSpellInfo());
} }
void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster) const void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster) const
@@ -7000,7 +7002,13 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
target->SendPeriodicAuraLog(&pInfo); target->SendPeriodicAuraLog(&pInfo);
if (caster) if (caster)
target->getHostileRefMgr().threatAssist(caster, float(gain) * 0.5f, GetSpellInfo()); {
float threat = float(gain) * 0.5f;
if (caster->IsClass(CLASS_PALADIN))
threat *= 0.5f;
target->getHostileRefMgr().threatAssist(caster, threat, GetSpellInfo());
}
bool haveCastItem = GetBase()->GetCastItemGUID(); bool haveCastItem = GetBase()->GetCastItemGUID();
+5 -1
View File
@@ -2808,7 +2808,11 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
} }
int32 gain = caster->HealBySpell(healInfo, crit); int32 gain = caster->HealBySpell(healInfo, crit);
unitTarget->getHostileRefMgr().threatAssist(caster, float(gain) * 0.5f, m_spellInfo); float threat = float(gain) * 0.5f;
if (caster->IsClass(CLASS_PALADIN))
threat *= 0.5f;
unitTarget->getHostileRefMgr().threatAssist(caster, threat, m_spellInfo);
m_healing = gain; m_healing = gain;
// Xinef: if heal acutally healed something, add no overheal flag // Xinef: if heal acutally healed something, add no overheal flag