mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 02:10:28 +00:00
Run clang-format
This commit is contained in:
@@ -1,34 +1,36 @@
|
||||
/*
|
||||
* 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 "CasterShamanStrategy.h"
|
||||
|
||||
#include "Playerbots.h"
|
||||
|
||||
class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
CasterShamanStrategyActionNodeFactory()
|
||||
{
|
||||
creators["magma totem"] = &magma_totem;
|
||||
creators["totem of wrath"] = &totem_of_wrath;
|
||||
}
|
||||
public:
|
||||
CasterShamanStrategyActionNodeFactory()
|
||||
{
|
||||
creators["magma totem"] = &magma_totem;
|
||||
creators["totem of wrath"] = &totem_of_wrath;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* magma_totem([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("magma totem",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
|
||||
}
|
||||
static ActionNode* totem_of_wrath(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("totem of wrath",
|
||||
/*P*/ NULL,
|
||||
/*A*/ NextAction::array(0, new NextAction("flametongue totem"), NULL),
|
||||
/*C*/ NULL);
|
||||
}
|
||||
private:
|
||||
static ActionNode* magma_totem([[maybe_unused]] PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("magma totem",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ nullptr,
|
||||
/*C*/ NextAction::array(0, new NextAction("fire nova"), nullptr));
|
||||
}
|
||||
static ActionNode* totem_of_wrath(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode("totem of wrath",
|
||||
/*P*/ NULL,
|
||||
/*A*/ NextAction::array(0, new NextAction("flametongue totem"), NULL),
|
||||
/*C*/ NULL);
|
||||
}
|
||||
};
|
||||
|
||||
CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanStrategy(botAI)
|
||||
@@ -38,35 +40,41 @@ CasterShamanStrategy::CasterShamanStrategy(PlayerbotAI* botAI) : GenericShamanSt
|
||||
|
||||
NextAction** CasterShamanStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0,
|
||||
new NextAction("lava burst", ACTION_DEFAULT + 0.2f),
|
||||
new NextAction("lightning bolt", ACTION_DEFAULT),
|
||||
NULL);
|
||||
return NextAction::array(0, new NextAction("lava burst", ACTION_DEFAULT + 0.2f),
|
||||
new NextAction("lightning bolt", ACTION_DEFAULT), NULL);
|
||||
}
|
||||
|
||||
void CasterShamanStrategy::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("flametongue weapon", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("main hand weapon no imbue", NextAction::array(0, new NextAction("flametongue weapon", 22.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("elemental mastery", NextAction::array(0, new NextAction("elemental mastery", 27.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost shock", 21.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode(
|
||||
"no fire totem",
|
||||
NextAction::array(0,
|
||||
new NextAction("totem of wrath", 15.0f), NULL)));
|
||||
// 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("flametongue weapon", 23.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("main hand weapon no imbue",
|
||||
NextAction::array(0, new NextAction("flametongue weapon", 22.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("searing totem", NextAction::array(0, new NextAction("searing totem", 19.0f),
|
||||
// nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("flame shock", NextAction::array(0, new NextAction("flame shock", 20.0f), nullptr)));
|
||||
triggers.push_back(new TriggerNode("elemental mastery",
|
||||
NextAction::array(0, new NextAction("elemental mastery", 27.0f), nullptr)));
|
||||
// triggers.push_back(new TriggerNode("frost shock snare", NextAction::array(0, new NextAction("frost
|
||||
// shock", 21.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("no fire totem", NextAction::array(0, new NextAction("totem of wrath", 15.0f), NULL)));
|
||||
|
||||
triggers.push_back(new TriggerNode("enemy is close", NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(new TriggerNode("enemy is close",
|
||||
NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("medium mana", NextAction::array(0, new NextAction("thunderstorm", ACTION_HIGH + 1), nullptr)));
|
||||
|
||||
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("enemy too close for spell",
|
||||
NextAction::array(0, new NextAction("flee", ACTION_MOVE + 9), nullptr)));
|
||||
}
|
||||
|
||||
void CasterAoeShamanStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
triggers.push_back(new TriggerNode("light aoe", NextAction::array(0, new NextAction("chain lightning", 25.0f), nullptr)));
|
||||
triggers.push_back(
|
||||
new TriggerNode("light aoe", NextAction::array(0, new NextAction("chain lightning", 25.0f), nullptr)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user