From c48d69a802f46ad7320229c384e182f79d050294 Mon Sep 17 00:00:00 2001 From: Atidot3 Date: Sat, 27 Jul 2024 10:33:49 +0200 Subject: [PATCH] Fix shaman cure strategy --- src/strategy/shaman/ShamanActions.h | 30 +++---------------- src/strategy/shaman/ShamanAiObjectContext.cpp | 16 +++++----- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/src/strategy/shaman/ShamanActions.h b/src/strategy/shaman/ShamanActions.h index 2db469fb..1b8d0101 100644 --- a/src/strategy/shaman/ShamanActions.h +++ b/src/strategy/shaman/ShamanActions.h @@ -5,9 +5,7 @@ #ifndef _PLAYERBOT_SHAMANACTIONS_H #define _PLAYERBOT_SHAMANACTIONS_H -#include "Define.h" #include "GenericSpellActions.h" -#include "Playerbots.h" #include "SharedDefines.h" class PlayerbotAI; @@ -362,31 +360,11 @@ class CastWindShearOnEnemyHealerAction : public CastSpellOnEnemyHealerAction CastWindShearOnEnemyHealerAction(PlayerbotAI* botAI) : CastSpellOnEnemyHealerAction(botAI, "wind shear") { } }; -// class CastCurePoisonAction : public CastCureSpellAction -// { -// public: -// CastCurePoisonAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cure poison") { } -// }; +CURE_ACTION(CastCurePoisonActionSham, "cure disease"); +CURE_PARTY_ACTION(CastCurePoisonOnPartyActionSham, "cure poison", DISPEL_POISON); -// class CastCurePoisonOnPartyAction : public CurePartyMemberAction -// { -// public: -// CastCurePoisonOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cure poison", DISPEL_POISON) { } -// }; - -// class CastCureDiseaseAction : public CastCureSpellAction -// { -// public: -// CastCureDiseaseAction(PlayerbotAI* botAI) : CastCureSpellAction(botAI, "cure disease") { } -// }; - -// class CastCureDiseaseOnPartyAction : public CurePartyMemberAction -// { -// public: -// CastCureDiseaseOnPartyAction(PlayerbotAI* botAI) : CurePartyMemberAction(botAI, "cure disease", DISPEL_DISEASE) { } - -// std::string const getName() override { return "cure disease on party"; } -// }; +CURE_ACTION(CastCureDiseaseActionSham, "cure disease"); +CURE_PARTY_ACTION(CastCureDiseaseOnPartyActionSham, "cure disease", DISPEL_DISEASE); class CastLavaBurstAction : public CastSpellAction { diff --git a/src/strategy/shaman/ShamanAiObjectContext.cpp b/src/strategy/shaman/ShamanAiObjectContext.cpp index cee208c2..f7ac2223 100644 --- a/src/strategy/shaman/ShamanAiObjectContext.cpp +++ b/src/strategy/shaman/ShamanAiObjectContext.cpp @@ -213,10 +213,10 @@ class ShamanAiObjectContextInternal : public NamedObjectContext creators["heroism"] = &ShamanAiObjectContextInternal::heroism; creators["bloodlust"] = &ShamanAiObjectContextInternal::bloodlust; creators["elemental mastery"] = &ShamanAiObjectContextInternal::elemental_mastery; - // creators["cure disease"] = &ShamanAiObjectContextInternal::cure_disease; - // creators["cure disease on party"] = &ShamanAiObjectContextInternal::cure_disease_on_party; - // creators["cure poison"] = &ShamanAiObjectContextInternal::cure_poison; - // creators["cure poison on party"] = &ShamanAiObjectContextInternal::cure_poison_on_party; + creators["cure disease"] = &ShamanAiObjectContextInternal::cure_disease; + creators["cure disease on party"] = &ShamanAiObjectContextInternal::cure_disease_on_party; + creators["cure poison"] = &ShamanAiObjectContextInternal::cure_poison; + creators["cure poison on party"] = &ShamanAiObjectContextInternal::cure_poison_on_party; creators["lava burst"] = &ShamanAiObjectContextInternal::lava_burst; creators["earth shield on main tank"] = &ShamanAiObjectContextInternal::earth_shield_on_main_tank; creators["fire elemental totem"] = &ShamanAiObjectContextInternal::fire_elemental_totem; @@ -277,10 +277,10 @@ class ShamanAiObjectContextInternal : public NamedObjectContext static Action* lava_lash(PlayerbotAI* botAI) { return new CastLavaLashAction(botAI); } static Action* ancestral_spirit(PlayerbotAI* botAI) { return new CastAncestralSpiritAction(botAI); } static Action* wind_shear_on_enemy_healer(PlayerbotAI* botAI) { return new CastWindShearOnEnemyHealerAction(botAI); } - // static Action* cure_poison(PlayerbotAI* botAI) { return new CastCurePoisonAction(botAI); } - // static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyAction(botAI); } - // static Action* cure_disease(PlayerbotAI* botAI) { return new CastCureDiseaseAction(botAI); } - // static Action* cure_disease_on_party(PlayerbotAI* botAI) { return new CastCureDiseaseOnPartyAction(botAI); } + static Action* cure_poison(PlayerbotAI* botAI) { return new CastCurePoisonActionSham(botAI); } + static Action* cure_poison_on_party(PlayerbotAI* botAI) { return new CastCurePoisonOnPartyActionSham(botAI); } + static Action* cure_disease(PlayerbotAI* botAI) { return new CastCureDiseaseActionSham(botAI); } + static Action* cure_disease_on_party(PlayerbotAI* botAI) { return new CastCureDiseaseOnPartyActionSham(botAI); } static Action* lava_burst(PlayerbotAI* ai) { return new CastLavaBurstAction(ai); } static Action* earth_shield_on_main_tank(PlayerbotAI* ai) { return new CastEarthShieldOnMainTankAction(ai); } static Action* totem_of_wrath(PlayerbotAI* ai) { return new CastTotemOfWrathAction(ai); }