Delete Empty ActionNodes (#2445)

<!--
Thank you for contributing to mod-playerbots, please make sure that
you...
1. Submit your PR to the test-staging branch, not master.
2. Read the guidelines below before submitting.
3. Don't delete parts of this template.

DESIGN PHILOSOPHY: We prioritize STABILITY, PERFORMANCE, AND
PREDICTABILITY over behavioral realism.

Every action and decision executes PER BOT AND PER TRIGGER. Small
increases in logic complexity scale
poorly across thousands of bots and negatively affect all. We prioritize
a stable system over a smarter
one. Bots don't need to behave perfectly; believable behavior is the
goal, not human simulation.
Default behavior must be cheap in processing; expensive behavior must be
opt-in.

Before submitting, make sure your changes aligns with these principles.
-->

## Pull Request Description
<!-- Describe what this change does and why it is needed -->

No functional changes in this PR--just cleaning up a bunch of unused
code.

Engine::CreateActionNode creates an empty node when one is not supplied
by an ActionNodeFactory. That means that all ActionNodes in class
strategies that are empty (no prerequisite, alternative, or
continuation) are unnecessary. I've already deleted some in past PRs.
This one gets rid of all that remains.

I also deleted DeathKnightBuffStrategyFactoryInternal, which provides
the "bdps" strategy for DKs, which is not associated with any actions.
It's just a dead factory and inoperative strategy.

## Feature Evaluation
<!--
If your PR is very minimal (comment typo, wrong ID reference, etc), and
it is very obvious it will not have
any impact on performance, you may skip these question. If necessary, a
maintainer may ask you for them later.
-->

<!-- Please answer the following: -->
- Describe the **minimum logic** required to achieve the intended
behavior.
- Describe the **processing cost** when this logic executes across many
bots.



## How to Test the Changes
<!--
- Step-by-step instructions to test the change.
- Any required setup (e.g. multiple players, number of bots, specific
configuration).
- Expected behavior and how to verify it.
-->



## Impact Assessment
<!-- As a generic test, before and after measure of pmon (playerbot pmon
tick) can help you here. -->
- Does this change increase per-bot/per-tick processing or risk scaling
poorly with thousands of bots?
    - - [x] No, not at all
    - - [ ] Minimal impact (**explain below**)
    - - [ ] Moderate impact (**explain below**)



- Does this change modify default bot behavior?
    - - [x] No
    - - [ ] Yes (**explain why**)



- Does this change add new decision branches or increase maintenance
complexity?
    - - [x] No
    - - [ ] Yes (**explain below**)



## AI Assistance
<!--
AI assistance is allowed, but all submitted code must be fully
understood, reviewed, and owned by the contributor.
We expect contributors to be honest about what they do and do not
understand.
-->
Was AI assistance used while working on this change?
- - [ ] No
- - [x] Yes (**explain below**)
<!--
If yes, please specify:
- Purpose of usage (e.g. brainstorming, refactoring, documentation, code
generation).
- Which parts of the change were influenced or generated, and whether it
was thoroughly reviewed.
-->

I had GPT-5.4 run a check for any empty ActionNodes that I missed after
I was done, and it caught a few.

<!--
TRANSLATIONS:
Anything new that the bots say in chat must be in a translatable format.
This is done using GetBotTextOrDefault,
which you can search for in the codebase to find examples. Your code
needs to have English as the default fallback,
while the full translations need to be in an SQL update file. The
languages in the file are the nine language
options supported by AzerothCore: English, Korean, French, German,
Chinese, Taiwanese, Spanish, Spanish Mexico, and
Russian. See
data/sql/playerbots/updates/2025_12_27_ai_playerbot_fishing_text.sql as
an example of a translation SQL
update, whose content are called within the codebase at
src/strategy/actions/FishingAction.cpp
-->

## Final Checklist

- - [x] Stability is not compromised.
- - [x] Performance impact is understood, tested, and acceptable.
- - [x] Added logic complexity is justified and explained.
- - [x] Any new bot dialogue lines are translated.
- - [x] Documentation updated if needed (Conf comments, WiKi commands).

## Notes for Reviewers
<!-- Anything else that's helpful to review or test your pull request.
-->
This commit is contained in:
Crow 2026-06-12 15:06:07 -05:00 committed by GitHub
parent 8b1250f219
commit db3cd7a93b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
25 changed files with 17 additions and 813 deletions

View File

@ -51,18 +51,6 @@ private:
static Strategy* blood(PlayerbotAI* botAI) { return new BloodDKStrategy(botAI); }
};
class DeathKnightDKBuffStrategyFactoryInternal : public NamedObjectContext<Strategy>
{
public:
DeathKnightDKBuffStrategyFactoryInternal() : NamedObjectContext<Strategy>(false, true)
{
creators["bdps"] = &DeathKnightDKBuffStrategyFactoryInternal::bdps;
}
private:
static Strategy* bdps(PlayerbotAI* botAI) { return new DKBuffDpsStrategy(botAI); }
};
class DeathKnightTriggerFactoryInternal : public NamedObjectContext<Trigger>
{
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<Action>& actionContexts)

View File

@ -5,36 +5,9 @@
#include "GenericDKNonCombatStrategy.h"
class GenericDKNonCombatStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
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<TriggerNode*>& triggers)
@ -47,8 +20,3 @@ void GenericDKNonCombatStrategy::InitTriggers(std::vector<TriggerNode*>& trigger
triggers.push_back(
new TriggerNode("bone shield", { NextAction("bone shield", 21.0f) }));
}
void DKBuffDpsStrategy::InitTriggers(std::vector<TriggerNode*>& /*triggers*/)
{
}

View File

@ -20,13 +20,4 @@ public:
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
};
class DKBuffDpsStrategy : public Strategy
{
public:
DKBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {}
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
std::string const getName() override { return "bdps"; }
};
#endif

View File

@ -1,5 +1,6 @@
#/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, 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 <www.azerothcore.org>, 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<ActionNode>
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)

View File

@ -1,5 +1,6 @@
/*
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, 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 <www.azerothcore.org>, 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"

View File

@ -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)

View File

@ -12,41 +12,15 @@ class CatDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
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)

View File

@ -109,7 +109,6 @@ private:
/*A*/ {},
/*C*/ {});
}
};
GenericDruidNonCombatStrategy::GenericDruidNonCombatStrategy(PlayerbotAI* botAI) : NonCombatStrategy(botAI)

View File

@ -14,75 +14,12 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
public:
GenericDruidStrategyActionNodeFactory()
{
creators["melee"] = &melee;
creators["caster form"] = &caster_form;
creators["cure poison"] = &cure_poison;
creators["cure poison on party"] = &cure_poison_on_party;
creators["abolish poison"] = &abolish_poison;
creators["abolish poison on party"] = &abolish_poison_on_party;
creators["rebirth"] = &rebirth;
creators["entangling roots on cc"] = &entangling_roots_on_cc;
creators["cyclone on cc"] = &cyclone_on_cc;
creators["hibernate on cc"] = &hibernate_on_cc;
}
private:
static ActionNode* melee([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("melee",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* caster_form([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("caster form",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* cure_poison([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("cure poison",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* cure_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("cure poison on party",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* abolish_poison([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("abolish poison",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* abolish_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("abolish poison on party",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* rebirth([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("rebirth",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* entangling_roots_on_cc([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("entangling roots on cc",

View File

@ -7,26 +7,9 @@
#include "Playerbots.h"
class RestoDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
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<TriggerNode*>& triggers)

View File

@ -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(

View File

@ -56,7 +56,6 @@ void PaladinCureStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
void PaladinBoostStrategy::InitTriggers(std::vector<TriggerNode*>& /*triggers*/)
{
// triggers.push_back(new TriggerNode("divine favor", { NextAction("divine favor",
// ACTION_HIGH + 1) }));
}

View File

@ -16,10 +16,8 @@ class GenericPaladinStrategyActionNodeFactory : public NamedObjectFactory<Action
public:
GenericPaladinStrategyActionNodeFactory()
{
// creators["seal of light"] = &seal_of_light;
creators["cleanse poison"] = &cleanse_poison;
creators["cleanse disease"] = &cleanse_disease;
creators["cleanse magic"] = &cleanse_magic;
creators["cleanse poison on party"] = &cleanse_poison_on_party;
creators["cleanse disease on party"] = &cleanse_disease_on_party;
creators["seal of corruption"] = &seal_of_corruption;
@ -28,22 +26,11 @@ public:
creators["seal of wisdom"] = &seal_of_wisdom;
creators["seal of justice"] = &seal_of_justice;
creators["hand of reckoning"] = &hand_of_reckoning;
creators["judgement"] = &judgement;
creators["judgement of wisdom"] = &judgement_of_wisdom;
creators["divine shield"] = &divine_shield;
creators["flash of light"] = &flash_of_light;
creators["flash of light on party"] = &flash_of_light_on_party;
creators["holy wrath"] = &holy_wrath;
creators["lay on hands"] = &lay_on_hands;
creators["lay on hands on party"] = &lay_on_hands_on_party;
creators["hammer of wrath"] = &hammer_of_wrath;
creators["retribution aura"] = &retribution_aura;
creators["blessing of kings"] = &blessing_of_kings;
creators["blessing of wisdom"] = &blessing_of_wisdom;
creators["blessing of kings on party"] = &blessing_of_kings_on_party;
creators["blessing of wisdom on party"] = &blessing_of_wisdom_on_party;
creators["blessing of sanctuary on party"] = &blessing_of_sanctuary_on_party;
creators["blessing of sanctuary"] = &blessing_of_sanctuary;
creators["taunt spell"] = &hand_of_reckoning;
creators["righteous defense"] = &righteous_defense;
creators["avenger's shield"] = &avengers_shield;
@ -51,48 +38,6 @@ public:
}
private:
static ActionNode* blessing_of_sanctuary(PlayerbotAI* /* ai */)
{
return new ActionNode("blessing of sanctuary",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* blessing_of_kings(PlayerbotAI* /* ai */)
{
return new ActionNode("blessing of kings",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* blessing_of_wisdom(PlayerbotAI* /* ai */)
{
return new ActionNode("blessing of wisdom",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* blessing_of_kings_on_party(PlayerbotAI* /* ai */)
{
return new ActionNode("blessing of kings on party",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* blessing_of_wisdom_on_party(PlayerbotAI* /* ai */)
{
return new ActionNode("blessing of wisdom on party",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* blessing_of_sanctuary_on_party(PlayerbotAI* /* ai */)
{
return new ActionNode("blessing of sanctuary on party",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* retribution_aura(PlayerbotAI* /* ai */)
{
return new ActionNode("retribution aura",
@ -100,28 +45,6 @@ private:
/*A*/ { NextAction("devotion aura") },
/*C*/ {});
}
static ActionNode* lay_on_hands(PlayerbotAI* /* ai */)
{
return new ActionNode("lay on hands",
/*P*/ {},
/*A*/ {}, // { NextAction("divine shield"), new
// NextAction("flash of light"), NULL),
/*C*/ {});
}
static ActionNode* lay_on_hands_on_party(PlayerbotAI* /* ai */)
{
return new ActionNode("lay on hands on party",
/*P*/ {},
/*A*/ {}, // { NextAction("flash of light"), NULL),
/*C*/ {});
}
// static ActionNode* seal_of_light(PlayerbotAI* /* ai */)
// {
// return new ActionNode ("seal of light",
// /*P*/ NULL,
// /*A*/ { NextAction("seal of justice"), NULL),
// /*C*/ NULL);
// }
static ActionNode* cleanse_poison(PlayerbotAI* /* ai */)
{
return new ActionNode("cleanse poison",
@ -129,13 +52,6 @@ private:
/*A*/ { NextAction("purify poison") },
/*C*/ {});
}
static ActionNode* cleanse_magic(PlayerbotAI* /* ai */)
{
return new ActionNode("cleanse magic",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* cleanse_disease(PlayerbotAI* /* ai */)
{
return new ActionNode("cleanse disease",
@ -181,9 +97,9 @@ private:
static ActionNode* seal_of_wisdom(PlayerbotAI* /* ai */)
{
return new ActionNode ("seal of wisdom",
/*P*/ {},
/*A*/ { NextAction("seal of corruption") },
/*C*/ {});
/*P*/ {},
/*A*/ { NextAction("seal of corruption") },
/*C*/ {});
}
static ActionNode* seal_of_justice(PlayerbotAI* /* ai */)
{
@ -227,13 +143,6 @@ private:
/*A*/ { NextAction("judgement of light") },
/*C*/ {});
}
static ActionNode* judgement(PlayerbotAI* /* ai */)
{
return new ActionNode("judgement",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* divine_shield(PlayerbotAI* /* ai */)
{
return new ActionNode("divine shield",
@ -255,20 +164,6 @@ private:
/*A*/ { NextAction("holy light on party") },
/*C*/ {});
}
static ActionNode* holy_wrath(PlayerbotAI* /* ai */)
{
return new ActionNode("holy wrath",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
static ActionNode* hammer_of_wrath(PlayerbotAI* /* ai */)
{
return new ActionNode("hammer of wrath",
/*P*/ {},
/*A*/ {},
/*C*/ {});
}
};
#endif

View File

@ -8,13 +8,9 @@
#include "Playerbots.h"
#include "Strategy.h"
class HealPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
};
HealPaladinStrategy::HealPaladinStrategy(PlayerbotAI* botAI) : GenericPaladinStrategy(botAI)
{
actionNodeFactories.Add(new HealPaladinStrategyActionNodeFactory());
// No custom ActionNodeFactory needed
}
std::vector<NextAction> HealPaladinStrategy::getDefaultActions()

View File

@ -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)

View File

@ -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<ActionNode>

View File

@ -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(

View File

@ -6,45 +6,9 @@
#include "AfflictionWarlockStrategy.h"
#include "Playerbots.h"
// ===== Action Node Factory =====
class AfflictionWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
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 =====

View File

@ -6,53 +6,9 @@
#include "DemonologyWarlockStrategy.h"
#include "Playerbots.h"
// ===== Action Node Factory =====
class DemonologyWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
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 =====

View File

@ -6,49 +6,9 @@
#include "DestructionWarlockStrategy.h"
#include "Playerbots.h"
// ===== Action Node Factory =====
class DestructionWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
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 =====

View File

@ -5,29 +5,9 @@
#include "GenericWarlockStrategy.h"
class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
{
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<NextAction> GenericWarlockStrategy::getDefaultActions()

View File

@ -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<ActionNode>
{
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<NextAction> TankWarlockStrategy::getDefaultActions()
{
// Shadow Ward is the highest priority, Searing Pain next.
return {
NextAction("shadow ward", 27.5f),
NextAction("searing pain", 27.0f)

View File

@ -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)

View File

@ -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)

View File

@ -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)