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,8 +1,10 @@
/*
* 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 "ServerFacade.h"
#include "Playerbots.h"
#include "TargetedMovementGenerator.h"
@@ -15,7 +17,7 @@ float ServerFacade::GetDistance2d(Unit* unit, WorldObject* wo)
return std::round(dist * 10.0f) / 10.0f;
}
float ServerFacade::GetDistance2d(Unit *unit, float x, float y)
float ServerFacade::GetDistance2d(Unit* unit, float x, float y)
{
float dist = unit->GetDistance2d(x, y);
return std::round(dist * 10.0f) / 10.0f;
@@ -23,25 +25,19 @@ float ServerFacade::GetDistance2d(Unit *unit, float x, float y)
bool ServerFacade::IsDistanceLessThan(float dist1, float dist2)
{
//return dist1 - dist2 < sPlayerbotAIConfig->targetPosRecalcDistance;
// return dist1 - dist2 < sPlayerbotAIConfig->targetPosRecalcDistance;
return dist1 < dist2;
}
bool ServerFacade::IsDistanceGreaterThan(float dist1, float dist2)
{
//return dist1 - dist2 > sPlayerbotAIConfig->targetPosRecalcDistance;
// return dist1 - dist2 > sPlayerbotAIConfig->targetPosRecalcDistance;
return dist1 > dist2;
}
bool ServerFacade::IsDistanceGreaterOrEqualThan(float dist1, float dist2)
{
return !IsDistanceLessThan(dist1, dist2);
}
bool ServerFacade::IsDistanceGreaterOrEqualThan(float dist1, float dist2) { return !IsDistanceLessThan(dist1, dist2); }
bool ServerFacade::IsDistanceLessOrEqualThan(float dist1, float dist2)
{
return !IsDistanceGreaterThan(dist1, dist2);
}
bool ServerFacade::IsDistanceLessOrEqualThan(float dist1, float dist2) { return !IsDistanceGreaterThan(dist1, dist2); }
void ServerFacade::SetFacingTo(Player* bot, WorldObject* wo, bool force)
{
@@ -50,8 +46,8 @@ void ServerFacade::SetFacingTo(Player* bot, WorldObject* wo, bool force)
// bot->SetFacingTo(bot->GetAngle(wo));
// else
// {
bot->SetOrientation(angle);
bot->SendMovementFlagUpdate();
bot->SetOrientation(angle);
bot->SendMovementFlagUpdate();
// }
}