mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
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:
@@ -49,8 +49,15 @@ bool AttackAnythingAction::isUseful()
|
||||
return false;
|
||||
|
||||
std::string const name = std::string(target->GetName());
|
||||
if (!name.empty() && name.find("Dummy") != std::string::npos) // Target is not a targetdummy
|
||||
return false;
|
||||
// Check for invalid targets: Dummy, Charge Target, Melee Target, Ranged Target
|
||||
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
|
||||
// away from master.
|
||||
|
||||
Reference in New Issue
Block a user