Merge pull request #791 from avirar/stop_attacking_argent_tournament_dummy_targets

Prevent bots attacking dummy targets at the Argent Tournament Grounds
This commit is contained in:
Yunfan Li
2024-12-17 20:48:36 +08:00
committed by GitHub

View File

@@ -49,8 +49,15 @@ bool AttackAnythingAction::isUseful()
return false; return false;
std::string const name = std::string(target->GetName()); std::string const name = std::string(target->GetName());
if (!name.empty() && name.find("Dummy") != std::string::npos) // Target is not a targetdummy // Check for invalid targets: Dummy, Charge Target, Melee Target, Ranged Target
return false; if (!name.empty() &&
(name.find("Dummy") != std::string::npos ||
name.find("Charge Target") != std::string::npos ||
name.find("Melee Target") != std::string::npos ||
name.find("Ranged Target") != std::string::npos))
{
return false; // Target is one of the disallowed types
}
// if (!ChooseRpgTargetAction::isFollowValid(bot, target)) //Do not grind mobs far // if (!ChooseRpgTargetAction::isFollowValid(bot, target)) //Do not grind mobs far
// away from master. // away from master.