From dff4934dd160c5b27c7805f91bb2c109de3eaa46 Mon Sep 17 00:00:00 2001 From: Gonzalo Date: Thu, 25 Sep 2025 18:35:18 -0300 Subject: [PATCH] Fix: Prevent priests in Spirit of Redemption form from using mana This change modifies the `HasManaValue::Calculate()` function in `src/strategy/values/StatsValues.cpp`. Previously, priests in Spirit of Redemption form (angel form when dead) could still attempt to use mana-restoring actions like drinking water, which is illogical since they cannot use mana in that form. This fix adds a check for the Spirit of Redemption aura (spell ID 20711) to prevent mana usage: - If the target has the Spirit of Redemption aura, the function returns false - This prevents priests in angel form from attempting to drink water or use other mana-restoring actions - Improves bot behavior realism by respecting the limitations of the Spirit of Redemption form This change works in conjunction with the previous fix that prevents non-mana-using classes from attempting to restore mana, creating a more comprehensive solution for mana management. --- src/strategy/values/StatsValues.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/strategy/values/StatsValues.cpp b/src/strategy/values/StatsValues.cpp index 2c87ec72..1208c567 100644 --- a/src/strategy/values/StatsValues.cpp +++ b/src/strategy/values/StatsValues.cpp @@ -119,6 +119,9 @@ bool HasManaValue::Calculate() Unit* target = GetTarget(); if (!target) return false; + + if (target->HasAura(20711)) // Spirit of Redemption + return false; return target->GetPower(POWER_MANA); }