From 89b243c75aae19b241122baea72cef3e209e448a Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Wed, 20 Aug 2025 22:19:02 -0400 Subject: [PATCH] Core/Auras: Check min power instead of 0 for SPELL_AURA_OBS_MOD_POWER Port From (https://github.com/TrinityCore/TrinityCore/commit/c850e2f7801fecd9a56d88dda1fc60e27fd30bdf) --- Source/Game/Entities/StatSystem.cs | 2 +- Source/Game/Spells/Auras/AuraEffect.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/Game/Entities/StatSystem.cs b/Source/Game/Entities/StatSystem.cs index a41dac57a..f9f2e77ec 100644 --- a/Source/Game/Entities/StatSystem.cs +++ b/Source/Game/Entities/StatSystem.cs @@ -177,7 +177,7 @@ namespace Game.Entities } } - int GetMinPower(PowerType power) { return power == PowerType.LunarPower ? -100 : 0; } + public int GetMinPower(PowerType power) { return power == PowerType.LunarPower ? -100 : 0; } // returns negative amount on power reduction public int ModifyPower(PowerType power, int dVal, bool withPowerUpdate = true) diff --git a/Source/Game/Spells/Auras/AuraEffect.cs b/Source/Game/Spells/Auras/AuraEffect.cs index 33ce72c5b..044d4a784 100644 --- a/Source/Game/Spells/Auras/AuraEffect.cs +++ b/Source/Game/Spells/Auras/AuraEffect.cs @@ -5578,8 +5578,13 @@ namespace Game.Spells // 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)) + if (GetAmount() >= 0) + { + if (target.GetPower(powerType) >= target.GetMaxPower(powerType)) + return; + } + else + if (target.GetPower(powerType) <= target.GetMinPower(powerType)) return; }