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,13 +1,13 @@
/*
* 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 "PlayerbotAIBase.h"
#include "Playerbots.h"
PlayerbotAIBase::PlayerbotAIBase(bool isBotAI) : nextAICheckDelay(0), _isBotAI(isBotAI)
{
}
PlayerbotAIBase::PlayerbotAIBase(bool isBotAI) : nextAICheckDelay(0), _isBotAI(isBotAI) {}
void PlayerbotAIBase::UpdateAI(uint32 elapsed, bool minimal)
{
@@ -26,12 +26,12 @@ void PlayerbotAIBase::UpdateAI(uint32 elapsed, bool minimal)
void PlayerbotAIBase::SetNextCheckDelay(uint32 const delay)
{
// if (nextAICheckDelay < delay)
// LOG_DEBUG("playerbots", "Setting lesser delay {} -> {}", nextAICheckDelay, delay);
// LOG_DEBUG("playerbots", "Setting lesser delay {} -> {}", nextAICheckDelay, delay);
nextAICheckDelay = delay;
// if (nextAICheckDelay > sPlayerbotAIConfig->globalCoolDown)
// LOG_DEBUG("playerbots", "std::set next check delay: {}", nextAICheckDelay);
// LOG_DEBUG("playerbots", "std::set next check delay: {}", nextAICheckDelay);
}
void PlayerbotAIBase::IncreaseNextCheckDelay(uint32 delay)
@@ -42,10 +42,7 @@ void PlayerbotAIBase::IncreaseNextCheckDelay(uint32 delay)
// LOG_DEBUG("playerbots", "increase next check delay: {}", nextAICheckDelay);
}
bool PlayerbotAIBase::CanUpdateAI()
{
return nextAICheckDelay == 0;
}
bool PlayerbotAIBase::CanUpdateAI() { return nextAICheckDelay == 0; }
void PlayerbotAIBase::YieldThread(bool delay)
{
@@ -53,12 +50,6 @@ void PlayerbotAIBase::YieldThread(bool delay)
nextAICheckDelay = delay ? sPlayerbotAIConfig->reactDelay * 10 : sPlayerbotAIConfig->reactDelay;
}
bool PlayerbotAIBase::IsActive()
{
return nextAICheckDelay < sPlayerbotAIConfig->maxWaitForMove;
}
bool PlayerbotAIBase::IsActive() { return nextAICheckDelay < sPlayerbotAIConfig->maxWaitForMove; }
bool PlayerbotAIBase::IsBotAI() const
{
return _isBotAI;
}
bool PlayerbotAIBase::IsBotAI() const { return _isBotAI; }