Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Core/Spells: update the max health after applying or unapplying SPELL…
Browse files Browse the repository at this point in the history
…_AURA_MOD_INCREASE_HEALTH_PERCENT
  • Loading branch information
Ovahlord committed Oct 16, 2023
1 parent 98aae1c commit 9e5902b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3917,6 +3917,8 @@ void AuraEffect::HandleAuraModIncreaseHealthPercent(AuraApplication const* aurAp
target->SetStatPctModifier(UNIT_MOD_HEALTH, TOTAL_PCT, amount);
}

target->UpdateMaxHealth();

if (target->GetHealth() > 0)
{
uint32 newHealth = std::max<uint32>(CalculatePct(target->GetMaxHealth(), percent), 1);
Expand Down

0 comments on commit 9e5902b

Please sign in to comment.