diff --git a/src/Ai/Class/Dk/DKAiObjectContext.cpp b/src/Ai/Class/Dk/DKAiObjectContext.cpp index 85f8bc8cd..e8d7f2118 100644 --- a/src/Ai/Class/Dk/DKAiObjectContext.cpp +++ b/src/Ai/Class/Dk/DKAiObjectContext.cpp @@ -51,18 +51,6 @@ private: static Strategy* blood(PlayerbotAI* botAI) { return new BloodDKStrategy(botAI); } }; -class DeathKnightDKBuffStrategyFactoryInternal : public NamedObjectContext -{ -public: - DeathKnightDKBuffStrategyFactoryInternal() : NamedObjectContext(false, true) - { - creators["bdps"] = &DeathKnightDKBuffStrategyFactoryInternal::bdps; - } - -private: - static Strategy* bdps(PlayerbotAI* botAI) { return new DKBuffDpsStrategy(botAI); } -}; - class DeathKnightTriggerFactoryInternal : public NamedObjectContext { public: @@ -299,7 +287,6 @@ void DKAiObjectContext::BuildSharedStrategyContexts(SharedNamedObjectContextList AiObjectContext::BuildSharedStrategyContexts(strategyContexts); strategyContexts.Add(new DeathKnightStrategyFactoryInternal()); strategyContexts.Add(new DeathKnightCombatStrategyFactoryInternal()); - strategyContexts.Add(new DeathKnightDKBuffStrategyFactoryInternal()); } void DKAiObjectContext::BuildSharedActionContexts(SharedNamedObjectContextList& actionContexts) diff --git a/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp b/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp index 9bf2b54b1..a10d117f3 100644 --- a/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp +++ b/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.cpp @@ -5,36 +5,9 @@ #include "GenericDKNonCombatStrategy.h" -class GenericDKNonCombatStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - GenericDKNonCombatStrategyActionNodeFactory() - { - creators["bone shield"] = &bone_shield; - creators["horn of winter"] = &horn_of_winter; - } - -private: - static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("bone shield", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("horn of winter", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } -}; - GenericDKNonCombatStrategy::GenericDKNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) { - actionNodeFactories.Add(new GenericDKNonCombatStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } void GenericDKNonCombatStrategy::InitTriggers(std::vector& triggers) @@ -47,8 +20,3 @@ void GenericDKNonCombatStrategy::InitTriggers(std::vector& trigger triggers.push_back( new TriggerNode("bone shield", { NextAction("bone shield", 21.0f) })); } - -void DKBuffDpsStrategy::InitTriggers(std::vector& /*triggers*/) -{ - -} diff --git a/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.h b/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.h index 37e8c74bc..b7c3ad857 100644 --- a/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.h +++ b/src/Ai/Class/Dk/Strategy/GenericDKNonCombatStrategy.h @@ -20,13 +20,4 @@ public: void InitTriggers(std::vector& triggers) override; }; -class DKBuffDpsStrategy : public Strategy -{ -public: - DKBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} - - void InitTriggers(std::vector& triggers) override; - std::string const getName() override { return "bdps"; } -}; - #endif diff --git a/src/Ai/Class/Dk/Strategy/GenericDKStrategy.cpp b/src/Ai/Class/Dk/Strategy/GenericDKStrategy.cpp index 109341612..258dfad79 100644 --- a/src/Ai/Class/Dk/Strategy/GenericDKStrategy.cpp +++ b/src/Ai/Class/Dk/Strategy/GenericDKStrategy.cpp @@ -1,5 +1,6 @@ -#/* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it and/or modify it under version 3 of the License, or (at your option), any later version. +/* + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it + * and/or modify it under version 3 of the License, or (at your option), any later version. */ #include "GenericDKStrategy.h" @@ -12,53 +13,12 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory public: GenericDKStrategyActionNodeFactory() { - // blood - // creators["rune tap"] = &rune_tap; cd - // creators["vampiric blood"] = &vampiric_blood; - // creators["death pact"] = &death_pact; - // creators["hysteria"] = &hysteria; boost party - // creators["dancing rune weapon"] = &dancing_rune_weapon; //cd - // creators["dark command"] = &dark_command; taunt - - // frost - // creators["chains of ice"] = &chains_of_ice; - // creators["icy clutch"] = &icy_clutch; - creators["horn of winter"] = &horn_of_winter; - creators["killing machine"] = &killing_machine; // buff - // creators["deathchill"] = &deathchill; //boost - creators["icebound fortitude"] = &icebound_fortitude; - // creators["mind freeze"] = &mind_freeze; interrupt - // creators["empower rune weapon"] = &empower_rune_weapon; boost - // creators["hungering cold"] = &hungering_cold; snare - // creators["unbreakable armor"] = &unbreakable_armor; boost +cd - // creators["improved icy talons"] = &improved_icy_talons; boost party - - // unholy - creators["death and decay"] = &death_and_decay; - // creators["raise dead"] = &raise_dead; - // creators["army of the dead"] = &army of the dead; - // creators["summon gargoyle"] = &army of the dead; - // creators["anti magic shell"] = &anti_magic_shell; cd + creators["killing machine"] = &killing_machine; creators["anti magic zone"] = &anti_magic_zone; - // creators["ghoul frenzy"] = &ghoul_frenzy; - creators["corpse explosion"] = &corpse_explosion; - creators["bone shield"] = &bone_shield; - creators["heart strike"] = &heart_strike; creators["death grip"] = &death_grip; - creators["plague strike"] = &plague_strike; - creators["pestilence"] = &pestilence; - creators["icy touch"] = &icy_touch; } private: - static ActionNode* death_coil([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("death coil", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - static ActionNode* death_grip([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("death grip", @@ -67,54 +27,6 @@ private: /*C*/ {}); } - static ActionNode* plague_strike([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("plague strike", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("icy touch", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("heart strike", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* pestilence([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("pestilence", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("horn of winter", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("bone shield", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - static ActionNode* killing_machine([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("killing machine", @@ -123,22 +35,6 @@ private: /*C*/ {}); } - static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("corpse explosion", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - - static ActionNode* death_and_decay([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("death and decay", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } - static ActionNode* anti_magic_zone([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode("anti magic zone", @@ -146,14 +42,6 @@ private: /*A*/ { NextAction("anti magic shell") }, /*C*/ {}); } - - static ActionNode* icebound_fortitude([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("icebound fortitude", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } }; GenericDKStrategy::GenericDKStrategy(PlayerbotAI* botAI) : MeleeCombatStrategy(botAI) diff --git a/src/Ai/Class/Dk/Strategy/UnholyDKStrategy.cpp b/src/Ai/Class/Dk/Strategy/UnholyDKStrategy.cpp index 40a0ac041..d7c321f35 100644 --- a/src/Ai/Class/Dk/Strategy/UnholyDKStrategy.cpp +++ b/src/Ai/Class/Dk/Strategy/UnholyDKStrategy.cpp @@ -1,5 +1,6 @@ /* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it and/or modify it under version 3 of the License, or (at your option), any later version. + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it + * and/or modify it under version 3 of the License, or (at your option), any later version. */ #include "UnholyDKStrategy.h" diff --git a/src/Ai/Class/Druid/Strategy/BearDruidStrategy.cpp b/src/Ai/Class/Druid/Strategy/BearDruidStrategy.cpp index 418f057cd..b848a4595 100644 --- a/src/Ai/Class/Druid/Strategy/BearDruidStrategy.cpp +++ b/src/Ai/Class/Druid/Strategy/BearDruidStrategy.cpp @@ -13,16 +13,11 @@ public: BearDruidStrategyActionNodeFactory() { creators["feral charge - bear"] = &feral_charge_bear; - creators["swipe (bear)"] = &swipe_bear; - creators["bear form"] = &bear_form; creators["dire bear form"] = &dire_bear_form; - creators["mangle (bear)"] = &mangle_bear; creators["maul"] = &maul; creators["bash"] = &bash; creators["swipe"] = &swipe; creators["lacerate"] = &lacerate; - creators["demoralizing roar"] = &demoralizing_roar; - creators["taunt spell"] = &growl; } private: @@ -36,26 +31,6 @@ private: ); } - static ActionNode* swipe_bear([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "swipe (bear)", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* bear_form([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "bear form", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - static ActionNode* dire_bear_form([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( @@ -66,16 +41,6 @@ private: ); } - static ActionNode* mangle_bear([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "mangle (bear)", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - static ActionNode* maul([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( @@ -115,26 +80,6 @@ private: /*C*/ {} ); } - - static ActionNode* growl([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "growl", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* demoralizing_roar([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "demoralizing roar", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } }; BearDruidStrategy::BearDruidStrategy(PlayerbotAI* botAI) : FeralDruidStrategy(botAI) diff --git a/src/Ai/Class/Druid/Strategy/CatDruidStrategy.cpp b/src/Ai/Class/Druid/Strategy/CatDruidStrategy.cpp index df6ba4a92..151eda277 100644 --- a/src/Ai/Class/Druid/Strategy/CatDruidStrategy.cpp +++ b/src/Ai/Class/Druid/Strategy/CatDruidStrategy.cpp @@ -12,41 +12,15 @@ class CatDruidStrategyActionNodeFactory : public NamedObjectFactory public: CatDruidStrategyActionNodeFactory() { - creators["faerie fire (feral)"] = &faerie_fire_feral; - creators["melee"] = &melee; creators["feral charge - cat"] = &feral_charge_cat; creators["cat form"] = &cat_form; creators["claw"] = &claw; - creators["mangle (cat)"] = &mangle_cat; - creators["rake"] = &rake; - creators["ferocious bite"] = &ferocious_bite; - creators["rip"] = &rip; creators["pounce"] = &pounce; creators["ravage"] = &ravage; creators["prowl"] = &prowl; } private: - static ActionNode* faerie_fire_feral([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "faerie fire (feral)", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* melee([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "melee", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - static ActionNode* feral_charge_cat([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( @@ -77,46 +51,6 @@ private: ); } - static ActionNode* mangle_cat([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "mangle (cat)", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* rake([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "rake", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* ferocious_bite([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "ferocious bite", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* rip([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "rip", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - static ActionNode* ravage([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( @@ -146,7 +80,6 @@ private: /*C*/ {} ); } - }; CatDruidStrategy::CatDruidStrategy(PlayerbotAI* botAI) : FeralDruidStrategy(botAI) diff --git a/src/Ai/Class/Druid/Strategy/GenericDruidNonCombatStrategy.cpp b/src/Ai/Class/Druid/Strategy/GenericDruidNonCombatStrategy.cpp index 0977540f6..b125a9dba 100644 --- a/src/Ai/Class/Druid/Strategy/GenericDruidNonCombatStrategy.cpp +++ b/src/Ai/Class/Druid/Strategy/GenericDruidNonCombatStrategy.cpp @@ -109,7 +109,6 @@ private: /*A*/ {}, /*C*/ {}); } - }; GenericDruidNonCombatStrategy::GenericDruidNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI) diff --git a/src/Ai/Class/Druid/Strategy/GenericDruidStrategy.cpp b/src/Ai/Class/Druid/Strategy/GenericDruidStrategy.cpp index 7393f7c51..5895ac027 100644 --- a/src/Ai/Class/Druid/Strategy/GenericDruidStrategy.cpp +++ b/src/Ai/Class/Druid/Strategy/GenericDruidStrategy.cpp @@ -14,75 +14,12 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - RestoDruidStrategyActionNodeFactory() { - creators["nourish on party"] = &nourish_on_party; - } - -private: - static ActionNode* nourish_on_party([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("nourish on party", - /*P*/ {}, - /*A*/ {}, - /*C*/ {}); - } -}; - RestoDruidStrategy::RestoDruidStrategy(PlayerbotAI* botAI) : GenericDruidStrategy(botAI) { - actionNodeFactories.Add(new RestoDruidStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } void RestoDruidStrategy::InitTriggers(std::vector& triggers) diff --git a/src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.cpp b/src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.cpp index fc6ae92a0..6598bc9da 100644 --- a/src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.cpp +++ b/src/Ai/Class/Paladin/Strategy/DpsPaladinStrategy.cpp @@ -16,7 +16,6 @@ public: creators["sanctity aura"] = &sanctity_aura; creators["retribution aura"] = &retribution_aura; creators["blessing of might"] = &blessing_of_might; - creators["crusader strike"] = &crusader_strike; creators["repentance"] = &repentance; creators["repentance on enemy healer"] = &repentance_on_enemy_healer; creators["repentance on snare target"] = &repentance_on_snare_target; @@ -34,16 +33,6 @@ private: ); } - static ActionNode* crusader_strike([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "crusader strike", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - static ActionNode* repentance([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( diff --git a/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp b/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp index 315b4a96f..b258c5b9d 100644 --- a/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp +++ b/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategy.cpp @@ -56,7 +56,6 @@ void PaladinCureStrategy::InitTriggers(std::vector& triggers) void PaladinBoostStrategy::InitTriggers(std::vector& /*triggers*/) { - // triggers.push_back(new TriggerNode("divine favor", { NextAction("divine favor", // ACTION_HIGH + 1) })); } diff --git a/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategyActionNodeFactory.h b/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategyActionNodeFactory.h index 1ac76dbd2..d73fcaabf 100644 --- a/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategyActionNodeFactory.h +++ b/src/Ai/Class/Paladin/Strategy/GenericPaladinStrategyActionNodeFactory.h @@ -16,10 +16,8 @@ class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory -{ -}; - HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI) { - actionNodeFactories.Add(new HealPaladinStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } std::vector HealPaladinStrategy::getDefaultActions() diff --git a/src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.cpp b/src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.cpp index b25fc36b3..239882e13 100644 --- a/src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.cpp +++ b/src/Ai/Class/Paladin/Strategy/OffhealRetPaladinStrategy.cpp @@ -18,8 +18,6 @@ public: creators["seal of vengeance"] = &seal_of_vengeance; creators["seal of command"] = &seal_of_command; creators["blessing of might"] = &blessing_of_might; - creators["crusader strike"] = &crusader_strike; - creators["divine plea"] = &divine_plea; } private: @@ -72,26 +70,6 @@ private: /*C*/ {} ); } - - static ActionNode* crusader_strike([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "crusader strike", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* divine_plea([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "divine plea", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } }; OffhealRetPaladinStrategy::OffhealRetPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI) diff --git a/src/Ai/Class/Priest/Strategy/GenericPriestStrategyActionNodeFactory.h b/src/Ai/Class/Priest/Strategy/GenericPriestStrategyActionNodeFactory.h index ab6a0c2ba..904c39696 100644 --- a/src/Ai/Class/Priest/Strategy/GenericPriestStrategyActionNodeFactory.h +++ b/src/Ai/Class/Priest/Strategy/GenericPriestStrategyActionNodeFactory.h @@ -21,7 +21,6 @@ public: creators["divine spirit"] = &divine_spirit; creators["divine spirit on party"] = &divine_spirit_on_party; creators["power word: shield"] = &power_word_shield; - // creators["power word: shield on party"] = &power_word_shield_on_party; creators["renew"] = &renew; creators["renew on party"] = &renew_on_party; creators["greater heal"] = &greater_heal; @@ -33,8 +32,6 @@ public: creators["flash heal"] = &flash_heal; creators["flash heal on party"] = &flash_heal_on_party; creators["psychic scream"] = &psychic_scream; - // creators["fade"] = &fade; - creators["shadowfiend"] = &shadowfiend; } private: @@ -210,16 +207,6 @@ private: /*C*/ {} ); } - - static ActionNode* shadowfiend([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "shadowfiend", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } }; class CurePriestStrategyActionNodeFactory : public NamedObjectFactory diff --git a/src/Ai/Class/Rogue/Strategy/DpsRogueStrategy.cpp b/src/Ai/Class/Rogue/Strategy/DpsRogueStrategy.cpp index 06aeda57c..0c3405b94 100644 --- a/src/Ai/Class/Rogue/Strategy/DpsRogueStrategy.cpp +++ b/src/Ai/Class/Rogue/Strategy/DpsRogueStrategy.cpp @@ -14,7 +14,6 @@ public: { creators["sinister strike"] = &sinister_strike; creators["kick"] = &kick; - creators["kidney shot"] = &kidney_shot; creators["backstab"] = &backstab; creators["rupture"] = &rupture; } @@ -40,15 +39,6 @@ private: /*C*/ {} ); } - static ActionNode* kidney_shot([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "kidney shot", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } static ActionNode* backstab([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( @@ -235,9 +225,6 @@ public: StealthedRogueStrategyActionNodeFactory() { creators["ambush"] = &ambush; - creators["cheap shot"] = &cheap_shot; - creators["garrote"] = &garrote; - creators["sap"] = &sap; creators["sinister strike"] = &sinister_strike; } @@ -252,36 +239,6 @@ private: ); } - static ActionNode* cheap_shot([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "cheap shot", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* garrote([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "garrote", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* sap([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode( - "sap", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - static ActionNode* sinister_strike([[maybe_unused]] PlayerbotAI* botAI) { return new ActionNode( diff --git a/src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.cpp index 78da04d99..93db05762 100644 --- a/src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/AfflictionWarlockStrategy.cpp @@ -6,45 +6,9 @@ #include "AfflictionWarlockStrategy.h" #include "Playerbots.h" -// ===== Action Node Factory ===== -class AfflictionWarlockStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - AfflictionWarlockStrategyActionNodeFactory() - { - creators["corruption"] = &corruption; - creators["corruption on attacker"] = &corruption; - creators["unstable affliction"] = &unstable_affliction; - creators["unstable affliction on attacker"] = &unstable_affliction; - creators["haunt"] = &haunt; - creators["shadow bolt"] = &shadow_bolt; - creators["drain soul"] = &drain_soul; - creators["life tap"] = &life_tap; - creators["shadowflame"] = &shadowflame; - creators["seed of corruption on attacker"] = &seed_of_corruption; - creators["seed of corruption"] = &seed_of_corruption; - creators["rain of fire"] = &rain_of_fire; - } - -private: - static ActionNode* corruption(PlayerbotAI*) { return new ActionNode("corruption", {}, {}, {}); } - static ActionNode* corruption_on_attacker(PlayerbotAI*) { return new ActionNode("corruption on attacker", {}, {}, {}); } - static ActionNode* unstable_affliction(PlayerbotAI*) { return new ActionNode("unstable affliction", {}, {}, {}); } - static ActionNode* unstable_affliction_on_attacker(PlayerbotAI*) { return new ActionNode("unstable affliction on attacker", {}, {}, {}); } - static ActionNode* haunt(PlayerbotAI*) { return new ActionNode("haunt", {}, {}, {}); } - static ActionNode* shadow_bolt(PlayerbotAI*) { return new ActionNode("shadow bolt", {}, {}, {}); } - static ActionNode* drain_soul(PlayerbotAI*) { return new ActionNode("drain soul", {}, {}, {}); } - static ActionNode* life_tap(PlayerbotAI*) { return new ActionNode("life tap", {}, {}, {}); } - static ActionNode* shadowflame(PlayerbotAI*) { return new ActionNode("shadowflame", {}, {}, {}); } - static ActionNode* seed_of_corruption_on_attacker(PlayerbotAI*) { return new ActionNode("seed of corruption on attacker", {}, {}, {}); } - static ActionNode* seed_of_corruption(PlayerbotAI*) { return new ActionNode("seed of corruption", {}, {}, {}); } - static ActionNode* rain_of_fire(PlayerbotAI*) { return new ActionNode("rain of fire", {}, {}, {}); } -}; - -// ===== Single Target Strategy ===== AfflictionWarlockStrategy::AfflictionWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI) { - actionNodeFactories.Add(new AfflictionWarlockStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } // ===== Default Actions ===== diff --git a/src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.cpp index 6bb4e9de5..c8d68523a 100644 --- a/src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/DemonologyWarlockStrategy.cpp @@ -6,53 +6,9 @@ #include "DemonologyWarlockStrategy.h" #include "Playerbots.h" -// ===== Action Node Factory ===== -class DemonologyWarlockStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - DemonologyWarlockStrategyActionNodeFactory() - { - creators["metamorphosis"] = &metamorphosis; - creators["demonic empowerment"] = &demonic_empowerment; - creators["corruption"] = &corruption; - creators["corruption on attacker"] = &corruption_on_attacker; - creators["immolate"] = &immolate; - creators["immolate on attacker"] = &immolate_on_attacker; - creators["incinerate"] = &incinerate; - creators["soul fire"] = &soul_fire; - creators["shadow bolt"] = &shadow_bolt; - creators["life tap"] = &life_tap; - creators["immolation aura"] = &immolation_aura; - creators["shadowflame"] = &shadowflame; - creators["seed of corruption on attacker"] = &seed_of_corruption_on_attacker; - creators["seed of corruption"] = &seed_of_corruption; - creators["rain of fire"] = &rain_of_fire; - creators["demon charge"] = &demon_charge; - } - -private: - static ActionNode* metamorphosis(PlayerbotAI*) { return new ActionNode("metamorphosis", {}, {}, {}); } - static ActionNode* demonic_empowerment(PlayerbotAI*) { return new ActionNode("demonic empowerment", {}, {}, {}); } - static ActionNode* corruption(PlayerbotAI*) { return new ActionNode("corruption", {}, {}, {}); } - static ActionNode* corruption_on_attacker(PlayerbotAI*) { return new ActionNode("corruption on attacker", {}, {}, {}); } - static ActionNode* immolate(PlayerbotAI*) { return new ActionNode("immolate", {}, {}, {}); } - static ActionNode* immolate_on_attacker(PlayerbotAI*) { return new ActionNode("immolate on attacker", {}, {}, {}); } - static ActionNode* incinerate(PlayerbotAI*) { return new ActionNode("incinerate", {}, {}, {}); } - static ActionNode* soul_fire(PlayerbotAI*) { return new ActionNode("soul fire", {}, {}, {}); } - static ActionNode* shadow_bolt(PlayerbotAI*) { return new ActionNode("shadow bolt", {}, {}, {}); } - static ActionNode* life_tap(PlayerbotAI*) { return new ActionNode("life tap", {}, {}, {}); } - static ActionNode* immolation_aura(PlayerbotAI*) { return new ActionNode("immolation aura", {}, {}, {}); } - static ActionNode* shadowflame(PlayerbotAI*) { return new ActionNode("shadowflame", {}, {}, {}); } - static ActionNode* seed_of_corruption_on_attacker(PlayerbotAI*) { return new ActionNode("seed of corruption on attacker", {}, {}, {}); } - static ActionNode* seed_of_corruption(PlayerbotAI*) { return new ActionNode("seed of corruption", {}, {}, {}); } - static ActionNode* rain_of_fire(PlayerbotAI*) { return new ActionNode("rain of fire", {}, {}, {}); } - static ActionNode* demon_charge(PlayerbotAI*) { return new ActionNode("demon charge", {}, {}, {}); } -}; - -// ===== Single Target Strategy ===== DemonologyWarlockStrategy::DemonologyWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI) { - actionNodeFactories.Add(new DemonologyWarlockStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } // ===== Default Actions ===== diff --git a/src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.cpp index af44de01c..2bbb32255 100644 --- a/src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/DestructionWarlockStrategy.cpp @@ -6,49 +6,9 @@ #include "DestructionWarlockStrategy.h" #include "Playerbots.h" -// ===== Action Node Factory ===== -class DestructionWarlockStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - DestructionWarlockStrategyActionNodeFactory() - { - creators["immolate"] = &immolate; - creators["conflagrate"] = &conflagrate; - creators["chaos bolt"] = &chaos_bolt; - creators["incinerate"] = &incinerate; - creators["corruption"] = &corruption; - creators["corruption on attacker"] = &corruption_on_attacker; - creators["shadow bolt"] = &shadow_bolt; - creators["shadowburn"] = &shadowburn; - creators["life tap"] = &life_tap; - creators["shadowfury"] = &shadowfury; - creators["shadowflame"] = &shadowflame; - creators["seed of corruption"] = &seed_of_corruption; - creators["seed of corruption on attacker"] = &seed_of_corruption; - creators["rain of fire"] = &rain_of_fire; - } - -private: - static ActionNode* immolate(PlayerbotAI*) { return new ActionNode("immolate", {}, {}, {}); } - static ActionNode* conflagrate(PlayerbotAI*) { return new ActionNode("conflagrate", {}, {}, {}); } - static ActionNode* chaos_bolt(PlayerbotAI*) { return new ActionNode("chaos bolt", {}, {}, {}); } - static ActionNode* incinerate(PlayerbotAI*) { return new ActionNode("incinerate", {}, {}, {}); } - static ActionNode* corruption(PlayerbotAI*) { return new ActionNode("corruption", {}, {}, {}); } - static ActionNode* corruption_on_attacker(PlayerbotAI*) { return new ActionNode("corruption on attacker", {}, {}, {}); } - static ActionNode* shadow_bolt(PlayerbotAI*) { return new ActionNode("shadow bolt", {}, {}, {}); } - static ActionNode* shadowburn(PlayerbotAI*) { return new ActionNode("shadowburn", {}, {}, {}); } - static ActionNode* life_tap(PlayerbotAI*) { return new ActionNode("life tap", {}, {}, {}); } - static ActionNode* shadowfury(PlayerbotAI*) { return new ActionNode("shadowfury", {}, {}, {}); } - static ActionNode* shadowflame(PlayerbotAI*) { return new ActionNode("shadowflame", {}, {}, {}); } - static ActionNode* seed_of_corruption(PlayerbotAI*) { return new ActionNode("seed of corruption", {}, {}, {}); } - static ActionNode* seed_of_corruption_on_attacker(PlayerbotAI*) { return new ActionNode("seed of corruption on attacker", {}, {}, {}); } - static ActionNode* rain_of_fire(PlayerbotAI*) { return new ActionNode("rain of fire", {}, {}, {}); } -}; - -// ===== Single Target Strategy ===== DestructionWarlockStrategy::DestructionWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI) { - actionNodeFactories.Add(new DestructionWarlockStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } // ===== Default Actions ===== diff --git a/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp index d5e06b54c..15fd1d57a 100644 --- a/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/GenericWarlockStrategy.cpp @@ -5,29 +5,9 @@ #include "GenericWarlockStrategy.h" -class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - GenericWarlockStrategyActionNodeFactory() - { - creators["banish on cc"] = &banish_on_cc; - creators["fear on cc"] = &fear_on_cc; - creators["spell lock"] = &spell_lock; - creators["devour magic purge"] = &devour_magic_purge; - creators["devour magic cleanse"] = &devour_magic_cleanse; - } - -private: - static ActionNode* banish_on_cc(PlayerbotAI*) { return new ActionNode("banish on cc", {}, {}, {}); } - static ActionNode* fear_on_cc(PlayerbotAI*) { return new ActionNode("fear on cc", {}, {}, {}); } - static ActionNode* spell_lock(PlayerbotAI*) { return new ActionNode("spell lock", {}, {}, {}); } - static ActionNode* devour_magic_purge(PlayerbotAI*) { return new ActionNode("devour magic purge", {}, {}, {}); } - static ActionNode* devour_magic_cleanse(PlayerbotAI*) { return new ActionNode("devour magic cleanse", {}, {}, {}); } -}; - GenericWarlockStrategy::GenericWarlockStrategy(PlayerbotAI* botAI) : CombatStrategy(botAI) { - actionNodeFactories.Add(new GenericWarlockStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } std::vector GenericWarlockStrategy::getDefaultActions() diff --git a/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp b/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp index ce10e6b9c..6e3c6cdcc 100644 --- a/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp +++ b/src/Ai/Class/Warlock/Strategy/TankWarlockStrategy.cpp @@ -5,36 +5,13 @@ #include "TankWarlockStrategy.h" -// Combat strategy for a Warlock Tank, for certain bosses like Twin Emperors -// Priority is set to spam Searing Pain and use Shadow Ward on CD -// Disabled by default -// To enable, type "co +tank" -// To disable, type "co -tank" - -// ===== Action Node Factory ===== -class TankWarlockStrategyActionNodeFactory : public NamedObjectFactory -{ -public: - TankWarlockStrategyActionNodeFactory() - { - creators["shadow ward"] = &shadow_ward; - creators["searing pain"] = &searing_pain; - } - -private: - static ActionNode* shadow_ward(PlayerbotAI*) { return new ActionNode("shadow ward", {}, {}, {}); } - static ActionNode* searing_pain(PlayerbotAI*) { return new ActionNode("searing pain", {}, {}, {}); } -}; - -// ===== Warlock Tank Combat Strategy ===== TankWarlockStrategy::TankWarlockStrategy(PlayerbotAI* botAI) : GenericWarlockStrategy(botAI) { - actionNodeFactories.Add(new TankWarlockStrategyActionNodeFactory()); + // No custom ActionNodeFactory needed } std::vector TankWarlockStrategy::getDefaultActions() { - // Shadow Ward is the highest priority, Searing Pain next. return { NextAction("shadow ward", 27.5f), NextAction("searing pain", 27.0f) diff --git a/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp index 193aab1d7..4addfa054 100644 --- a/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp @@ -15,9 +15,6 @@ public: creators["piercing howl"] = &piercing_howl; creators["mocking blow"] = &mocking_blow; creators["heroic strike"] = &heroic_strike; - creators["enraged regeneration"] = &enraged_regeneration; - creators["retaliation"] = &retaliation; - creators["shattering throw"] = &shattering_throw; } private: @@ -70,36 +67,6 @@ private: /*C*/ {} ); } - - static ActionNode* enraged_regeneration(PlayerbotAI* /*botAI*/) - { - return new ActionNode( - "enraged regeneration", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* retaliation(PlayerbotAI* /*botAI*/) - { - return new ActionNode( - "retaliation", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* shattering_throw(PlayerbotAI* /*botAI*/) - { - return new ActionNode( - "shattering throw", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } }; ArmsWarriorStrategy::ArmsWarriorStrategy(PlayerbotAI* botAI) : GenericWarriorStrategy(botAI) diff --git a/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp index 24e05ffe9..c1999473f 100644 --- a/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/FuryWarriorStrategy.cpp @@ -14,7 +14,6 @@ public: creators["intercept"] = &intercept; creators["piercing howl"] = &piercing_howl; creators["pummel"] = &pummel; - creators["enraged regeneration"] = &enraged_regeneration; } private: @@ -57,16 +56,6 @@ private: /*C*/ {} ); } - - static ActionNode* enraged_regeneration(PlayerbotAI* /*botAI*/) - { - return new ActionNode( - "enraged regeneration", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } }; FuryWarriorStrategy::FuryWarriorStrategy(PlayerbotAI* botAI) : GenericWarriorStrategy(botAI) diff --git a/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp index f256f2093..727039e2e 100644 --- a/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/TankWarriorStrategy.cpp @@ -19,8 +19,6 @@ public: creators["heroic throw taunt"] = &heroic_throw_taunt; creators["taunt"] = &taunt; creators["taunt spell"] = &taunt; - creators["vigilance"] = &vigilance; - creators["enraged regeneration"] = &enraged_regeneration; } private: @@ -103,26 +101,6 @@ private: /*C*/ {} ); } - - static ActionNode* vigilance(PlayerbotAI* /*botAI*/) - { - return new ActionNode( - "vigilance", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } - - static ActionNode* enraged_regeneration(PlayerbotAI* /*botAI*/) - { - return new ActionNode( - "enraged regeneration", - /*P*/ {}, - /*A*/ {}, - /*C*/ {} - ); - } }; TankWarriorStrategy::TankWarriorStrategy(PlayerbotAI* botAI) : GenericWarriorStrategy(botAI)