Fix BotMeditate to med at proper percentages

This commit is contained in:
nytmyr
2025-01-23 15:14:12 -06:00
parent 6364b00efd
commit b836e78adb
+10 -13
View File
@@ -1823,25 +1823,22 @@ void Bot::SpellProcess() {
} }
void Bot::BotMeditate(bool is_sitting) { void Bot::BotMeditate(bool is_sitting) {
if ( bool needs_to_med =
GetManaRatio() < GetSitManaPct() || (!IsEngaged() && (GetManaRatio() < 100 || GetHPRatio() < 100)) ||
(GetHPRatio() < GetSitHPPct() && GetLevel() < GetStopMeleeLevel()) (GetMedInCombat() && !HasTargetReflection() &&
) {
if (
( (
!IsEngaged() || GetManaRatio() < GetSitManaPct() ||
(IsEngaged() && GetMedInCombat() && !HasTargetReflection()) (GetHPRatio() < GetSitHPPct() && GetLevel() >= GetStopMeleeLevel())
) && )
!is_sitting );
) {
if (needs_to_med && !is_sitting) {
Sit(); Sit();
} }
} else { else if (!needs_to_med && is_sitting) {
if (is_sitting) {
Stand(); Stand();
} }
} }
}
bool Bot::BotRangedAttack(Mob* other, bool can_double_attack) { bool Bot::BotRangedAttack(Mob* other, bool can_double_attack) {
if ( if (