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

Port From (https://github.com/TrinityCore/TrinityCore/commit/c850e2f7801fecd9a56d88dda1fc60e27fd30bdf)
This commit is contained in:
Hondacrx
2025-08-20 22:19:02 -04:00
parent 889a55aa82
commit 89b243c75a
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -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 // returns negative amount on power reduction
public int ModifyPower(PowerType power, int dVal, bool withPowerUpdate = true) public int ModifyPower(PowerType power, int dVal, bool withPowerUpdate = true)
+7 -2
View File
@@ -5578,8 +5578,13 @@ namespace Game.Spells
// don't regen when permanent aura and limit is already reached // don't regen when permanent aura and limit is already reached
if (GetBase().IsPermanent()) if (GetBase().IsPermanent())
{ {
if ((target.GetPower(powerType) == target.GetMaxPower(powerType) && GetAmount() > 0) if (GetAmount() >= 0)
|| (target.GetPower(powerType) == 0 && GetAmount() < 0)) {
if (target.GetPower(powerType) >= target.GetMaxPower(powerType))
return;
}
else
if (target.GetPower(powerType) <= target.GetMinPower(powerType))
return; return;
} }