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,35 +1,37 @@
/*
* 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 "HealShamanStrategy.h"
#include "Playerbots.h"
class HealShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
HealShamanStrategyActionNodeFactory()
{
creators["earthliving weapon"] = &earthliving_weapon;
creators["mana tide totem"] = &mana_tide_totem;
}
public:
HealShamanStrategyActionNodeFactory()
{
creators["earthliving weapon"] = &earthliving_weapon;
creators["mana tide totem"] = &mana_tide_totem;
}
private:
static ActionNode* earthliving_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("earthliving weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr);
}
private:
static ActionNode* earthliving_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("earthliving weapon",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("flametongue weapon"), nullptr),
/*C*/ nullptr);
}
static ActionNode* mana_tide_totem([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mana tide totem",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("mana potion"), nullptr),
/*C*/ nullptr);
}
static ActionNode* mana_tide_totem([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("mana tide totem",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("mana potion"), nullptr),
/*C*/ nullptr);
}
};
HealShamanStrategy::HealShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
@@ -41,42 +43,44 @@ void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
GenericShamanStrategy::InitTriggers(triggers);
// triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell", ACTION_NORMAL + 9), nullptr)));
// triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new NextAction("earthliving weapon", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("main hand weapon no imbue", NextAction::array(0, new NextAction("earthliving weapon", 22.0f), nullptr)));
// triggers.push_back(new TriggerNode("enemy out of spell", NextAction::array(0, new NextAction("reach spell",
// ACTION_NORMAL + 9), nullptr))); triggers.push_back(new TriggerNode("shaman weapon", NextAction::array(0, new
// NextAction("earthliving weapon", 22.0f), nullptr)));
triggers.push_back(new TriggerNode("main hand weapon no imbue",
NextAction::array(0, new NextAction("earthliving weapon", 22.0f), nullptr)));
triggers.push_back(new TriggerNode(
"group heal occasion",
NextAction::array(0, new NextAction("riptide on party", 23.0f), new NextAction("chain heal", 22.0f), NULL)));
"group heal occasion",
NextAction::array(0, new NextAction("riptide on party", 23.0f), new NextAction("chain heal", 22.0f), NULL)));
triggers.push_back(new TriggerNode(
"party member critical health",
NextAction::array(0, new NextAction("riptide on party", 25.0f), new NextAction("healing wave on party", 24.0f), new NextAction("lesser healing wave on party", 23.0f), nullptr)));
NextAction::array(0, new NextAction("riptide on party", 25.0f), new NextAction("healing wave on party", 24.0f),
new NextAction("lesser healing wave on party", 23.0f), nullptr)));
triggers.push_back(new TriggerNode(
"party member low health",
NextAction::array(0, new NextAction("riptide on party", 19.0f), new NextAction("healing wave on party", 18.0f), new NextAction("lesser healing wave on party", 17.0f), nullptr)));
NextAction::array(0, new NextAction("riptide on party", 19.0f), new NextAction("healing wave on party", 18.0f),
new NextAction("lesser healing wave on party", 17.0f), nullptr)));
triggers.push_back(new TriggerNode(
triggers.push_back(new TriggerNode(
"party member medium health",
NextAction::array(0, new NextAction("riptide on party", 16.0f), new NextAction("healing wave on party", 15.0f), new NextAction("lesser healing wave on party", 14.0f), nullptr)));
triggers.push_back(new TriggerNode(
"party member almost full health",
NextAction::array(0, new NextAction("riptide on party", 12.0f), new NextAction("lesser healing wave on party", 11.0f), nullptr)));
triggers.push_back(new TriggerNode(
"party member cleanse spirit poison",
NextAction::array(0,
new NextAction("cleanse spirit poison on party", ACTION_DISPEL + 2),
new NextAction("cleansing totem", ACTION_DISPEL + 2),
NULL)));
NextAction::array(0, new NextAction("riptide on party", 16.0f), new NextAction("healing wave on party", 15.0f),
new NextAction("lesser healing wave on party", 14.0f), nullptr)));
triggers.push_back(new TriggerNode(
"party member cleanse spirit disease",
NextAction::array(0,
new NextAction("cleanse spirit disease on party", ACTION_DISPEL + 2),
new NextAction("cleansing totem", ACTION_DISPEL + 1),
NULL)));
triggers.push_back(
new TriggerNode("party member almost full health",
NextAction::array(0, new NextAction("riptide on party", 12.0f),
new NextAction("lesser healing wave on party", 11.0f), nullptr)));
triggers.push_back(
new TriggerNode("party member cleanse spirit poison",
NextAction::array(0, new NextAction("cleanse spirit poison on party", ACTION_DISPEL + 2),
new NextAction("cleansing totem", ACTION_DISPEL + 2), NULL)));
triggers.push_back(
new TriggerNode("party member cleanse spirit disease",
NextAction::array(0, new NextAction("cleanse spirit disease on party", ACTION_DISPEL + 2),
new NextAction("cleansing totem", ACTION_DISPEL + 1), NULL)));
triggers.push_back(new TriggerNode(
"party member cleanse spirit curse",
@@ -89,16 +93,18 @@ void HealShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
// triggers.push_back(new TriggerNode(
// "no water totem",
// NextAction::array(0, new NextAction("healing stream totem", 13.0f), NULL)));
triggers.push_back(new TriggerNode(
"earth shield on main tank",
NextAction::array(0, new NextAction("earth shield on main tank", ACTION_HIGH + 7), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell", NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
triggers.push_back(
new TriggerNode("earth shield on main tank",
NextAction::array(0, new NextAction("earth shield on main tank", ACTION_HIGH + 7), NULL)));
triggers.push_back(new TriggerNode("enemy too close for spell",
NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
triggers.push_back(
new TriggerNode("medium mana", NextAction::array(0, new NextAction("mana tide totem", ACTION_HIGH + 5), NULL)));
triggers.push_back(new TriggerNode(
"medium mana",
NextAction::array(0, new NextAction("mana tide totem", ACTION_HIGH + 5), NULL)));
triggers.push_back(new TriggerNode("party member to heal out of spell range", NextAction::array(0, new NextAction("reach party member to heal", ACTION_CRITICAL_HEAL + 1), nullptr)));
"party member to heal out of spell range",
NextAction::array(0, new NextAction("reach party member to heal", ACTION_CRITICAL_HEAL + 1), nullptr)));
}