mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 10:20:27 +00:00
Run clang-format
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it
|
||||
* and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#include "FollowActions.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "Event.h"
|
||||
#include "Formations.h"
|
||||
#include "Playerbots.h"
|
||||
#include "ServerFacade.h"
|
||||
#include "SharedDefines.h"
|
||||
#include <cstddef>
|
||||
|
||||
bool FollowAction::Execute(Event event)
|
||||
{
|
||||
@@ -44,19 +47,21 @@ bool FollowAction::Execute(Event event)
|
||||
// pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
|
||||
}
|
||||
}
|
||||
//if (moved)
|
||||
//botAI->SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
|
||||
// if (moved)
|
||||
// botAI->SetNextCheckDelay(sPlayerbotAIConfig->reactDelay);
|
||||
|
||||
return moved;
|
||||
}
|
||||
|
||||
bool FollowAction::isUseful()
|
||||
{
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr) {
|
||||
if (bot->GetCurrentSpell(CURRENT_CHANNELED_SPELL) != nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
Formation* formation = AI_VALUE(Formation*, "formation");
|
||||
if (!formation) {
|
||||
if (!formation)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
std::string const target = formation->GetTargetName();
|
||||
@@ -111,7 +116,7 @@ bool FleeToMasterAction::Execute(Event event)
|
||||
bool canFollow = Follow(fTarget);
|
||||
if (!canFollow)
|
||||
{
|
||||
//botAI->SetNextCheckDelay(5000);
|
||||
// botAI->SetNextCheckDelay(5000);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -129,9 +134,8 @@ bool FleeToMasterAction::Execute(Event event)
|
||||
if (!urand(0, 10))
|
||||
botAI->TellMaster("I heading to your position.");
|
||||
}
|
||||
else
|
||||
if (!urand(0,20))
|
||||
botAI->TellMaster("I am traveling to your position.");
|
||||
else if (!urand(0, 20))
|
||||
botAI->TellMaster("I am traveling to your position.");
|
||||
|
||||
botAI->SetNextCheckDelay(3000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user