diff --git a/src/strategy/hunter/DpsHunterStrategy.cpp b/src/strategy/hunter/DpsHunterStrategy.cpp index 47b6c94b..5e7c7aac 100644 --- a/src/strategy/hunter/DpsHunterStrategy.cpp +++ b/src/strategy/hunter/DpsHunterStrategy.cpp @@ -18,7 +18,7 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory { return new ActionNode ("aimed shot", /*P*/ nullptr, - /*A*/ NextAction::array(0, new NextAction("multi-shot", 10.0f), nullptr), + /*A*/ NextAction::array(0, new NextAction("multi-shot"), nullptr), /*C*/ nullptr); } }; diff --git a/src/strategy/hunter/HunterActions.h b/src/strategy/hunter/HunterActions.h index 0f7ba8e9..9c841710 100644 --- a/src/strategy/hunter/HunterActions.h +++ b/src/strategy/hunter/HunterActions.h @@ -83,6 +83,12 @@ class CastAspectOfTheHawkAction : public CastBuffSpellAction CastAspectOfTheHawkAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the hawk") { } }; +class CastAspectOfTheMonkeyAction : public CastBuffSpellAction +{ + public: + CastAspectOfTheMonkeyAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "aspect of the monkey") { } +}; + class CastAspectOfTheDragonhawkAction : public CastBuffSpellAction { public: diff --git a/src/strategy/hunter/HunterAiObjectContext.cpp b/src/strategy/hunter/HunterAiObjectContext.cpp index d6d65c19..22357e30 100644 --- a/src/strategy/hunter/HunterAiObjectContext.cpp +++ b/src/strategy/hunter/HunterAiObjectContext.cpp @@ -68,6 +68,7 @@ class HunterTriggerFactoryInternal : public NamedObjectContext creators["aspect of the pack"] = &HunterTriggerFactoryInternal::aspect_of_the_pack; creators["rapid fire"] = &HunterTriggerFactoryInternal::rapid_fire; creators["aspect of the hawk"] = &HunterTriggerFactoryInternal::aspect_of_the_hawk; + creators["aspect of the monkey"] = &HunterTriggerFactoryInternal::aspect_of_the_monkey; creators["aspect of the wild"] = &HunterTriggerFactoryInternal::aspect_of_the_wild; creators["aspect of the viper"] = &HunterTriggerFactoryInternal::aspect_of_the_viper; creators["trueshot aura"] = &HunterTriggerFactoryInternal::trueshot_aura; @@ -101,6 +102,7 @@ class HunterTriggerFactoryInternal : public NamedObjectContext static Trigger* aspect_of_the_pack(PlayerbotAI* botAI) { return new HunterAspectOfThePackTrigger(botAI); } static Trigger* rapid_fire(PlayerbotAI* botAI) { return new RapidFireTrigger(botAI); } static Trigger* aspect_of_the_hawk(PlayerbotAI* botAI) { return new HunterAspectOfTheHawkTrigger(botAI); } + static Trigger* aspect_of_the_monkey(PlayerbotAI* botAI) { return new HunterAspectOfTheMonkeyTrigger(botAI); } static Trigger* aspect_of_the_wild(PlayerbotAI* botAI) { return new HunterAspectOfTheWildTrigger(botAI); } static Trigger* low_ammo(PlayerbotAI* botAI) { return new HunterLowAmmoTrigger(botAI); } static Trigger* no_ammo(PlayerbotAI* botAI) { return new HunterNoAmmoTrigger(botAI); } @@ -140,6 +142,7 @@ class HunterAiObjectContextInternal : public NamedObjectContext creators["boost"] = &HunterAiObjectContextInternal::rapid_fire; creators["readiness"] = &HunterAiObjectContextInternal::readiness; creators["aspect of the hawk"] = &HunterAiObjectContextInternal::aspect_of_the_hawk; + creators["aspect of the monkey"] = &HunterAiObjectContextInternal::aspect_of_the_monkey; creators["aspect of the wild"] = &HunterAiObjectContextInternal::aspect_of_the_wild; creators["aspect of the viper"] = &HunterAiObjectContextInternal::aspect_of_the_viper; creators["aspect of the pack"] = &HunterAiObjectContextInternal::aspect_of_the_pack; @@ -189,6 +192,7 @@ class HunterAiObjectContextInternal : public NamedObjectContext static Action* rapid_fire(PlayerbotAI* botAI) { return new CastRapidFireAction(botAI); } static Action* readiness(PlayerbotAI* botAI) { return new CastReadinessAction(botAI); } static Action* aspect_of_the_hawk(PlayerbotAI* botAI) { return new CastAspectOfTheHawkAction(botAI); } + static Action* aspect_of_the_monkey(PlayerbotAI* botAI) { return new CastAspectOfTheMonkeyAction(botAI); } static Action* aspect_of_the_wild(PlayerbotAI* botAI) { return new CastAspectOfTheWildAction(botAI); } static Action* aspect_of_the_viper(PlayerbotAI* botAI) { return new CastAspectOfTheViperAction(botAI); } static Action* aspect_of_the_pack(PlayerbotAI* botAI) { return new CastAspectOfThePackAction(botAI); } diff --git a/src/strategy/hunter/HunterBuffStrategies.cpp b/src/strategy/hunter/HunterBuffStrategies.cpp index cc7f2b68..3eb7cad1 100644 --- a/src/strategy/hunter/HunterBuffStrategies.cpp +++ b/src/strategy/hunter/HunterBuffStrategies.cpp @@ -5,24 +5,47 @@ #include "HunterBuffStrategies.h" #include "Playerbots.h" +class BuffHunterStrategyActionNodeFactory : public NamedObjectFactory +{ + public: + BuffHunterStrategyActionNodeFactory() + { + creators["aspect of the hawk"] = &aspect_of_the_hawk; + } + + private: + static ActionNode* aspect_of_the_hawk([[maybe_unused]] PlayerbotAI* botAI) + { + return new ActionNode ("aspect of the hawk", + /*P*/ nullptr, + /*A*/ NextAction::array(0, new NextAction("aspect of the monkey"), nullptr), + /*C*/ nullptr); + } +}; + +HunterBuffDpsStrategy::HunterBuffDpsStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) +{ + actionNodeFactories.Add(new BuffHunterStrategyActionNodeFactory()); +} + void HunterBuffDpsStrategy::InitTriggers(std::vector& triggers) { triggers.push_back(new TriggerNode("aspect of the hawk", NextAction::array(0, - new NextAction("aspect of the dragonhawk", 90.0f), - new NextAction("aspect of the hawk", 89.0f),nullptr))); + new NextAction("aspect of the dragonhawk", 20.1f), + new NextAction("aspect of the hawk", 20.0f),nullptr))); } void HunterNatureResistanceStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("aspect of the wild", NextAction::array(0, new NextAction("aspect of the wild", 90.0f), nullptr))); + triggers.push_back(new TriggerNode("aspect of the wild", NextAction::array(0, new NextAction("aspect of the wild", 20.0f), nullptr))); } void HunterBuffSpeedStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("aspect of the pack", NextAction::array(0, new NextAction("aspect of the pack", 10.0f), nullptr))); + triggers.push_back(new TriggerNode("aspect of the pack", NextAction::array(0, new NextAction("aspect of the pack", 20.0f), nullptr))); } void HunterBuffManaStrategy::InitTriggers(std::vector& triggers) { - triggers.push_back(new TriggerNode("aspect of the viper", NextAction::array(0, new NextAction("aspect of the viper", 10.0f), nullptr))); + triggers.push_back(new TriggerNode("aspect of the viper", NextAction::array(0, new NextAction("aspect of the viper", 20.0f), nullptr))); } diff --git a/src/strategy/hunter/HunterBuffStrategies.h b/src/strategy/hunter/HunterBuffStrategies.h index 2f2e519f..c099a805 100644 --- a/src/strategy/hunter/HunterBuffStrategies.h +++ b/src/strategy/hunter/HunterBuffStrategies.h @@ -30,7 +30,7 @@ class HunterBuffManaStrategy : public NonCombatStrategy class HunterBuffDpsStrategy : public NonCombatStrategy { public: - HunterBuffDpsStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { } + HunterBuffDpsStrategy(PlayerbotAI* botAI); std::string const getName() override { return "bdps"; } void InitTriggers(std::vector& triggers) override; diff --git a/src/strategy/hunter/HunterTriggers.h b/src/strategy/hunter/HunterTriggers.h index c904732e..308b3f00 100644 --- a/src/strategy/hunter/HunterTriggers.h +++ b/src/strategy/hunter/HunterTriggers.h @@ -26,6 +26,12 @@ class AutoShotTrigger : public Trigger bool IsActive() override; }; +class HunterAspectOfTheMonkeyTrigger : public BuffTrigger +{ + public: + HunterAspectOfTheMonkeyTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "aspect of the monkey") { } +}; + class HunterAspectOfTheHawkTrigger : public BuffTrigger { public: