Big update.

This commit is contained in:
UltraNix
2022-03-12 22:27:09 +01:00
parent b3d00ccb26
commit b952636f0d
843 changed files with 1534330 additions and 99 deletions

View File

@@ -0,0 +1,74 @@
/*
* 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 "GenericMageNonCombatStrategy.h"
#include "Playerbots.h"
class GenericMageNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
public:
GenericMageNonCombatStrategyActionNodeFactory()
{
creators["molten armor"] = &molten_armor;
creators["mage armor"] = &mage_armor;
creators["ice armor"] = &ice_armor;
}
private:
static ActionNode* molten_armor(PlayerbotAI* botAI)
{
return new ActionNode ("molten armor",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("mage armor"), nullptr),
/*C*/ nullptr);
}
static ActionNode* mage_armor(PlayerbotAI* botAI)
{
return new ActionNode ("mage armor",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("ice armor"), nullptr),
/*C*/ nullptr);
}
static ActionNode* ice_armor(PlayerbotAI* botAI)
{
return new ActionNode ("ice armor",
/*P*/ nullptr,
/*A*/ NextAction::array(0, new NextAction("frost armor"), nullptr),
/*C*/ nullptr);
}
};
GenericMageNonCombatStrategy::GenericMageNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)
{
actionNodeFactories.Add(new GenericMageNonCombatStrategyActionNodeFactory());
}
void GenericMageNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
NonCombatStrategy::InitTriggers(triggers);
triggers.push_back(new TriggerNode("arcane intellect", NextAction::array(0, new NextAction("arcane intellect", 21.0f), nullptr)));
triggers.push_back(new TriggerNode("no drink", NextAction::array(0, new NextAction("conjure water", 16.0f), nullptr)));
triggers.push_back(new TriggerNode("no food", NextAction::array(0, new NextAction("conjure food", 15.0f), nullptr)));
triggers.push_back(new TriggerNode("often", NextAction::array(0, new NextAction("apply oil", 1.0f), nullptr)));
}
void MageBuffManaStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("mage armor", NextAction::array(0, new NextAction("mage armor", 19.0f), nullptr)));
}
void MageBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("mage armor", NextAction::array(0, new NextAction("molten armor", 19.0f), nullptr)));
}
void MageBuffStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("arcane intellect on party", NextAction::array(0, new NextAction("arcane intellect on party", 20.0f), nullptr)));
triggers.push_back(new TriggerNode("give water", NextAction::array(0, new NextAction("give water", 14.0f), nullptr)));
triggers.push_back(new TriggerNode("give food", NextAction::array(0, new NextAction("give food", 13.0f), nullptr)));
}