mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-02-13 23:33:47 +00:00
added 'move from group' action/strat/shortcut-action
This commit is contained in:
@@ -48,15 +48,19 @@ bool FollowAction::Execute(Event event)
|
||||
|
||||
bool FollowAction::isUseful()
|
||||
{
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr)
|
||||
{
|
||||
// move from group takes priority over follow as it's added and removed automatically
|
||||
// (without removing/adding follow)
|
||||
if (botAI->HasStrategy("move from group", BOT_STATE_COMBAT) ||
|
||||
botAI->HasStrategy("move from group", BOT_STATE_NON_COMBAT))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr)
|
||||
return false;
|
||||
|
||||
Formation* formation = AI_VALUE(Formation*, "formation");
|
||||
if (!formation)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string const target = formation->GetTargetName();
|
||||
|
||||
Unit* fTarget = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user