Improve inactive grind status

This commit is contained in:
Yunfan Li
2025-01-01 21:10:05 +08:00
parent 9d34a58435
commit 30437bd28f

View File

@@ -48,10 +48,12 @@ bool AttackAnythingAction::isUseful()
if (!target) if (!target)
return false; return false;
bool rpgGoStatus = botAI->rpgInfo.status == NewRpgStatus::GO_GRIND || bool inactiveGrindStatus = botAI->rpgInfo.status == NewRpgStatus::GO_GRIND ||
botAI->rpgInfo.status == NewRpgStatus::GO_INNKEEPER; 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; return false;
std::string const name = std::string(target->GetName()); std::string const name = std::string(target->GetName());