Core/Auras: Check min power instead of 0 for SPELL_AURA_OBS_MOD_POWER

This commit is contained in:
Shauren
2025-07-26 22:46:52 +02:00
parent 43644e4c29
commit c850e2f780

View File

@@ -6007,10 +6007,16 @@ void AuraEffect::HandleObsModPowerAuraTick(Unit* target, Unit* caster) const
// don't regen when permanent aura and limit is already reached
if (GetBase()->IsPermanent())
{
if ((target->GetPower(powerType) == target->GetMaxPower(powerType) && GetAmount() > 0)
|| (target->GetPower(powerType) == 0 && GetAmount() < 0))
return;
if (GetAmount() >= 0)
{
if (target->GetPower(powerType) >= target->GetMaxPower(powerType))
return;
}
else
if (target->GetPower(powerType) <= target->GetMinPower(powerType))
return;
}
int32 amount = GetAmount() * target->GetMaxPower(powerType) / 100;
TC_LOG_DEBUG("spells.aura.effect", "PeriodicTick: {} energize {} for {} dmg inflicted by {}",
GetCasterGUID().ToString(), target->GetGUID().ToString(), amount, GetId());