Run clang-format

This commit is contained in:
Yunfan Li
2024-08-04 10:23:36 +08:00
parent 44da167492
commit 53611c9040
835 changed files with 35085 additions and 31861 deletions

View File

@@ -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);