fix(Core/Player): smooth energy regeneration with SPELL_AURA_MOD_POWER_REGEN_PERCENT mods (#22041)

Co-authored-by: r4dish <ovitnez@gmail.com>
This commit is contained in:
Jelle Meeus
2025-05-04 14:20:59 +02:00
committed by GitHub
parent 3643d80ecf
commit 297f16820e
5 changed files with 32 additions and 35 deletions

View File

@@ -4664,6 +4664,8 @@ void AuraEffect::HandleModPowerRegen(AuraApplication const* aurApp, uint8 mode,
// Update manaregen value
if (GetMiscValue() == POWER_MANA)
target->ToPlayer()->UpdateManaRegen();
else if (GetMiscValue() == POWER_ENERGY)
target->ToPlayer()->UpdateEnergyRegen();
else if (GetMiscValue() == POWER_RUNE)
target->ToPlayer()->UpdateRuneRegen(RuneType(GetMiscValueB()));
// other powers are not immediate effects - implemented in Player::Regenerate, Creature::Regenerate