Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core/Spells: Fixed spell Health Funnel and Improved Health Funnel #20559

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Expand Up @@ -5945,6 +5945,16 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
if (funnelDamage > healInfo.GetEffectiveHeal() && healInfo.GetEffectiveHeal())
funnelDamage = healInfo.GetEffectiveHeal();

//Handle with Improved Health Funnel
if (caster->GetTypeId() == TYPEID_PLAYER)
caster->ToPlayer()->ApplySpellMod(GetSpellInfo()->Id, SPELLMOD_COST, funnelDamage);

if (caster->GetHealth() <= funnelDamage)
{
GetBase()->Remove();
return;
}

uint32 funnelAbsorb = 0;
caster->DealDamageMods(caster, funnelDamage, &funnelAbsorb);
caster->SendSpellNonMeleeDamageLog(caster, GetId(), funnelDamage, GetSpellInfo()->GetSchoolMask(), funnelAbsorb, 0, false, 0, false);
Expand Down
4 changes: 2 additions & 2 deletions src/server/game/Spells/Auras/SpellAuras.cpp
Expand Up @@ -348,7 +348,7 @@ m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procChar
m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false), m_dropEvent(nullptr),
m_procCooldown(std::chrono::steady_clock::time_point::min())
{
if (m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel)
if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_HEALTH_FUNNEL))
m_timeCla = 1 * IN_MILLISECONDS;

m_maxDuration = CalcMaxDuration(caster);
Expand Down Expand Up @@ -767,7 +767,7 @@ void Aura::RefreshDuration(bool withMods)
else
SetDuration(GetMaxDuration());

if (m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel)
if ((m_spellInfo->ManaPerSecond || m_spellInfo->ManaPerSecondPerLevel) && !m_spellInfo->HasAttribute(SPELL_ATTR2_HEALTH_FUNNEL))
m_timeCla = 1 * IN_MILLISECONDS;
}

Expand Down