mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Auras: Check min power instead of 0 for SPELL_AURA_OBS_MOD_POWER
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user