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,53 +1,55 @@
/*
* 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 "ArcaneMageStrategy.h"
#include "Playerbots.h"
class ArcaneMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
ArcaneMageStrategyActionNodeFactory()
{
creators["arcane blast"] = &arcane_blast;
creators["arcane barrage"] = &arcane_barrage;
creators["arcane missiles"] = &arcane_missiles;
// creators["firebolt"] = &firebolt;
}
public:
ArcaneMageStrategyActionNodeFactory()
{
creators["arcane blast"] = &arcane_blast;
creators["arcane barrage"] = &arcane_barrage;
creators["arcane missiles"] = &arcane_missiles;
// creators["firebolt"] = &firebolt;
}
private:
static ActionNode* arcane_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("arcane blast",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("arcane missiles"), nullptr),
/*C*/ nullptr);
}
private:
static ActionNode* arcane_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("arcane blast",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("arcane missiles"), nullptr),
/*C*/ nullptr);
}
static ActionNode* arcane_barrage([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("arcane barrage",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("arcane missiles"), nullptr),
/*C*/ nullptr);
}
static ActionNode* arcane_barrage([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("arcane barrage",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("arcane missiles"), nullptr),
/*C*/ nullptr);
}
static ActionNode* arcane_missiles([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("arcane missiles",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("fireball"), nullptr),
/*C*/ nullptr);
}
static ActionNode* arcane_missiles([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("arcane missiles",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("fireball"), nullptr),
/*C*/ nullptr);
}
// static ActionNode* firebolt([[maybe_unused]] PlayerbotAI* botAI)
// {
// return new ActionNode ("firebolt",
// /*P*/ nullptr,
// /*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
// /*C*/ nullptr);
// }
// static ActionNode* firebolt([[maybe_unused]] PlayerbotAI* botAI)
// {
// return new ActionNode ("firebolt",
// /*P*/ nullptr,
// /*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
// /*C*/ nullptr);
// }
};
ArcaneMageStrategy::ArcaneMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy(botAI)
@@ -57,27 +59,23 @@ ArcaneMageStrategy::ArcaneMageStrategy(PlayerbotAI* botAI) : GenericMageStrategy
NextAction** ArcaneMageStrategy::getDefaultActions()
{
return NextAction::array(0,
new NextAction("arcane blast", ACTION_DEFAULT + 0.1f),
new NextAction("shoot", ACTION_DEFAULT),
NULL);
return NextAction::array(0, new NextAction("arcane blast", ACTION_DEFAULT + 0.1f),
new NextAction("shoot", ACTION_DEFAULT), NULL);
}
void ArcaneMageStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericMageStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("arcane blast stack", NextAction::array(0, new NextAction("arcane missiles", 15.0f), NULL)));
triggers.push_back(
new TriggerNode("arcane blast stack", NextAction::array(0, new NextAction("arcane missiles", 15.0f), NULL)));
}
void ArcaneMageAoeStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
// triggers.push_back(new TriggerNode(
// "high aoe",
// NextAction::array(0, new NextAction("arcane explosion", 39.0f), NULL)));
triggers.push_back(new TriggerNode(
"medium aoe",
NextAction::array(0, new NextAction("blizzard", 40.0f), NULL)));
// triggers.push_back(new TriggerNode(
// "high aoe",
// NextAction::array(0, new NextAction("arcane explosion", 39.0f), NULL)));
triggers.push_back(new TriggerNode("medium aoe", NextAction::array(0, new NextAction("blizzard", 40.0f), NULL)));
}