Skip to content

fix(Core/Spells): Fixed Lay on hands healing reduction mods #21534

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

demetrzz
Copy link
Contributor

LoH healing wasnt getting reduced by mortal strike / aimed shot / wound poison and unrelenting assault effects.

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

Issues Addressed:

SOURCE:

From issues

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

LoH healing wasnt getting reduced by mortal strike and unrelenting assault effects
@github-actions github-actions bot added Script file-cpp Used to trigger the matrix build labels Feb 19, 2025
@Takenbacon
Copy link
Contributor

Curious what is actually happening in the handler for the modifiers to not be applied by default?

@sudlud
Copy link
Member

sudlud commented Mar 17, 2025

@Takenbacon this should probably be the relevant core section for handling the effects?

float minval = (float)target->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_PCT);
if (minval)
AddPct(TakenTotalMod, minval);
float maxval = (float)target->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT);
if (maxval)
AddPct(TakenTotalMod, maxval);
// Healing over time taken percent
float minval_hot = (float)target->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT);
if (minval_hot)
AddPct(TakenTotalMod, minval_hot);
float maxval_hot = (float)target->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HOT_PCT);
if (maxval_hot)
AddPct(TakenTotalMod, maxval_hot);
// Arena / BG Dampening
float minval_pct = (float)target->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
if (minval_pct)
AddPct(TakenTotalMod, minval_pct);
TakenTotalMod = std::max(TakenTotalMod, 0.0f);

@sudlud
Copy link
Member

sudlud commented Mar 17, 2025

and here also probably

float Unit::SpellPctHealingModsDone(Unit* victim, SpellInfo const* spellProto, DamageEffectType damagetype)
{
// 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);
// Some spells don't benefit from done mods
if (spellProto->HasAttribute(SPELL_ATTR3_IGNORE_CASTER_MODIFIERS))
return 1.0f;
// xinef: Some spells don't benefit from done mods
if (spellProto->HasAttribute(SPELL_ATTR6_IGNORE_HEALTH_MODIFIERS))
return 1.0f;
// No bonus healing for potion spells
if (spellProto->SpellFamilyName == SPELLFAMILY_POTION)
return 1.0f;
float DoneTotalMod = 1.0f;
// Healing done percent
AuraEffectList const& mHealingDonePct = GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT);
for (auto const& auraEff : mHealingDonePct)
{
if (!sScriptMgr->IsNeedModHealPercent(this, auraEff, DoneTotalMod, spellProto))
continue;
AddPct(DoneTotalMod, auraEff->GetAmount());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-cpp Used to trigger the matrix build Script
Projects
None yet
3 participants