mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user