From 30437bd28f4110a2e2f54b1b635547fecaa55a29 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 1 Jan 2025 21:10:05 +0800 Subject: [PATCH] Improve inactive grind status --- src/strategy/actions/ChooseTargetActions.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/strategy/actions/ChooseTargetActions.cpp b/src/strategy/actions/ChooseTargetActions.cpp index bd86740d..54813766 100644 --- a/src/strategy/actions/ChooseTargetActions.cpp +++ b/src/strategy/actions/ChooseTargetActions.cpp @@ -48,10 +48,12 @@ bool AttackAnythingAction::isUseful() if (!target) return false; - bool rpgGoStatus = botAI->rpgInfo.status == NewRpgStatus::GO_GRIND || - botAI->rpgInfo.status == NewRpgStatus::GO_INNKEEPER; + bool inactiveGrindStatus = botAI->rpgInfo.status == NewRpgStatus::GO_GRIND || + botAI->rpgInfo.status == NewRpgStatus::NEAR_NPC || + botAI->rpgInfo.status == NewRpgStatus::REST || + botAI->rpgInfo.status == NewRpgStatus::GO_INNKEEPER; - if (rpgGoStatus && bot->GetDistance(target) > 25.0f) + if (inactiveGrindStatus && bot->GetDistance(target) > 25.0f) return false; std::string const name = std::string(target->GetName());