mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-16 10:20:27 +00:00
Big update.
This commit is contained in:
44
src/strategy/priest/HolyPriestStrategy.cpp
Normal file
44
src/strategy/priest/HolyPriestStrategy.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* 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 "HolyPriestStrategy.h"
|
||||
#include "Playerbots.h"
|
||||
|
||||
class HolyPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
|
||||
{
|
||||
public:
|
||||
HolyPriestStrategyActionNodeFactory()
|
||||
{
|
||||
creators["smite"] = &smite;
|
||||
}
|
||||
|
||||
private:
|
||||
static ActionNode* smite(PlayerbotAI* botAI)
|
||||
{
|
||||
return new ActionNode ("smite",
|
||||
/*P*/ nullptr,
|
||||
/*A*/ NextAction::array(0, new NextAction("shoot"), nullptr),
|
||||
/*C*/ nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
HolyPriestStrategy::HolyPriestStrategy(PlayerbotAI* botAI) : HealPriestStrategy(botAI)
|
||||
{
|
||||
actionNodeFactories.Add(new HolyPriestStrategyActionNodeFactory());
|
||||
}
|
||||
|
||||
NextAction** HolyPriestStrategy::getDefaultActions()
|
||||
{
|
||||
return NextAction::array(0, new NextAction("smite", 10.0f), new NextAction("mana burn", 9.0f), new NextAction("starshards", 8.0f), nullptr);
|
||||
}
|
||||
|
||||
void HolyPriestStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
{
|
||||
HealPriestStrategy::InitTriggers(triggers);
|
||||
|
||||
triggers.push_back(new TriggerNode("holy fire", NextAction::array(0, new NextAction("holy fire", ACTION_NORMAL + 9), nullptr)));
|
||||
triggers.push_back(new TriggerNode("shadowfiend", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("medium mana", NextAction::array(0, new NextAction("shadowfiend", ACTION_HIGH), nullptr)));
|
||||
triggers.push_back(new TriggerNode("low mana", NextAction::array(0, new NextAction("mana burn", ACTION_HIGH), nullptr)));
|
||||
}
|
||||
Reference in New Issue
Block a user