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
+15 -18
View File
@@ -1823,24 +1823,21 @@ 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 ( GetManaRatio() < GetSitManaPct() ||
( (GetHPRatio() < GetSitHPPct() && GetLevel() >= GetStopMeleeLevel())
!IsEngaged() || )
(IsEngaged() && GetMedInCombat() && !HasTargetReflection()) );
) &&
!is_sitting if (needs_to_med && !is_sitting) {
) { Sit();
Sit(); }
} else if (!needs_to_med && is_sitting) {
} else { Stand();
if (is_sitting) { }
Stand();
}
}
} }
bool Bot::BotRangedAttack(Mob* other, bool can_double_attack) { bool Bot::BotRangedAttack(Mob* other, bool can_double_attack) {