mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-14 17:39:09 +00:00
Run clang-format
This commit is contained in:
@@ -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 "GroupValues.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
#include "ServerFacade.h"
|
||||
|
||||
@@ -24,7 +26,6 @@ GuidVector GroupMembersValue::Calculate()
|
||||
return members;
|
||||
}
|
||||
|
||||
|
||||
bool IsFollowingPartyValue::Calculate()
|
||||
{
|
||||
if (botAI->GetGroupMaster() == bot)
|
||||
@@ -55,7 +56,7 @@ bool BoolANDValue::Calculate()
|
||||
|
||||
for (auto value : values)
|
||||
{
|
||||
if(!AI_VALUE(bool, value))
|
||||
if (!AI_VALUE(bool, value))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -101,7 +102,7 @@ bool GroupBoolANDValue::Calculate()
|
||||
if (!GET_PLAYERBOT_AI(player))
|
||||
continue;
|
||||
|
||||
if (!PAI_VALUE2(bool,"and", getQualifier()))
|
||||
if (!PAI_VALUE2(bool, "and", getQualifier()))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,7 +142,7 @@ bool GroupReadyValue::Calculate()
|
||||
if (!member)
|
||||
continue;
|
||||
|
||||
if (inDungeon) //In dungeons all following members need to be alive before continueing.
|
||||
if (inDungeon) // In dungeons all following members need to be alive before continueing.
|
||||
{
|
||||
PlayerbotAI* memberAi = GET_PLAYERBOT_AI(member);
|
||||
|
||||
@@ -151,8 +152,10 @@ bool GroupReadyValue::Calculate()
|
||||
return false;
|
||||
}
|
||||
|
||||
//We only wait for members that are in range otherwise we might be waiting for bots stuck in dead loops forever.
|
||||
if (botAI->GetGroupMaster() && sServerFacade->GetDistance2d(member, botAI->GetGroupMaster()) > sPlayerbotAIConfig->sightDistance)
|
||||
// We only wait for members that are in range otherwise we might be waiting for bots stuck in dead loops
|
||||
// forever.
|
||||
if (botAI->GetGroupMaster() &&
|
||||
sServerFacade->GetDistance2d(member, botAI->GetGroupMaster()) > sPlayerbotAIConfig->sightDistance)
|
||||
continue;
|
||||
|
||||
if (member->GetHealthPct() < sPlayerbotAIConfig->almostFullHealth)
|
||||
@@ -161,7 +164,7 @@ bool GroupReadyValue::Calculate()
|
||||
if (!member->GetPower(POWER_MANA))
|
||||
continue;
|
||||
|
||||
float mana = (static_cast<float> (member->GetPower(POWER_MANA)) / member->GetMaxPower(POWER_MANA)) * 100;
|
||||
float mana = (static_cast<float>(member->GetPower(POWER_MANA)) / member->GetMaxPower(POWER_MANA)) * 100;
|
||||
|
||||
if (mana < sPlayerbotAIConfig->mediumMana)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user