diff --git a/playerbot/PlayerbotFactory.cpp b/playerbot/PlayerbotFactory.cpp index 10d69ed7a..3719a257d 100644 --- a/playerbot/PlayerbotFactory.cpp +++ b/playerbot/PlayerbotFactory.cpp @@ -320,6 +320,7 @@ void PlayerbotFactory::Randomize(bool incremental, bool syncWithMaster) pmo = sPerformanceMonitor.start(PERF_MON_RNDBOT, "PlayerbotFactory_Pet"); sLog.outDetail("Initializing pet..."); InitPet(); + InitPetSpells(); if (pmo) pmo->finish(); } @@ -680,6 +681,214 @@ void PlayerbotFactory::InitPet() } } +void PlayerbotFactory::InitPetSpells() +{ + Map* map = bot->GetMap(); + if (!map) + return; + + Pet* pet = bot->GetPet(); + if (pet) + { + if (bot->getClass() == CLASS_HUNTER) + { + // TO DO + // ... + } +// Warlock pets should auto learn spells on WOTLK +#ifndef MANGOSBOT_TWO + else if (bot->getClass() == CLASS_WARLOCK) + { + constexpr uint32 PET_IMP = 416; + constexpr uint32 PET_FELHUNTER = 417; + constexpr uint32 PET_VOIDWALKER = 1860; + constexpr uint32 PET_SUCCUBUS = 1863; + constexpr uint32 PET_FELGUARD = 17252; + + // pet type pet level pet spell id + std::map>> spellList; + + // Imp spells + { + // Blood Pact + spellList[PET_IMP].push_back(std::pair(4, 6307)); + spellList[PET_IMP].push_back(std::pair(14, 7804)); + spellList[PET_IMP].push_back(std::pair(26, 7805)); + spellList[PET_IMP].push_back(std::pair(38, 11766)); + spellList[PET_IMP].push_back(std::pair(50, 11767)); + spellList[PET_IMP].push_back(std::pair(62, 27268)); + spellList[PET_IMP].push_back(std::pair(74, 47982)); + + // Fire Shield + spellList[PET_IMP].push_back(std::pair(14, 2947)); + spellList[PET_IMP].push_back(std::pair(24, 8316)); + spellList[PET_IMP].push_back(std::pair(34, 8317)); + spellList[PET_IMP].push_back(std::pair(44, 11770)); + spellList[PET_IMP].push_back(std::pair(54, 11771)); + spellList[PET_IMP].push_back(std::pair(64, 27269)); + spellList[PET_IMP].push_back(std::pair(76, 47983)); + + // Firebolt + spellList[PET_IMP].push_back(std::pair(1, 3110)); + spellList[PET_IMP].push_back(std::pair(8, 7799)); + spellList[PET_IMP].push_back(std::pair(18, 7800)); + spellList[PET_IMP].push_back(std::pair(28, 7801)); + spellList[PET_IMP].push_back(std::pair(38, 7802)); + spellList[PET_IMP].push_back(std::pair(48, 11762)); + spellList[PET_IMP].push_back(std::pair(58, 11763)); + spellList[PET_IMP].push_back(std::pair(68, 27267)); + spellList[PET_IMP].push_back(std::pair(78, 47964)); + + // Phase Shift + spellList[PET_IMP].push_back(std::pair(12, 4511)); + } + + // Felhunter spells + { + // Devour Magic + spellList[PET_FELHUNTER].push_back(std::pair(30, 19505)); + spellList[PET_FELHUNTER].push_back(std::pair(38, 19731)); + spellList[PET_FELHUNTER].push_back(std::pair(46, 19734)); + spellList[PET_FELHUNTER].push_back(std::pair(54, 19736)); + spellList[PET_FELHUNTER].push_back(std::pair(62, 27276)); + spellList[PET_FELHUNTER].push_back(std::pair(70, 27277)); + spellList[PET_FELHUNTER].push_back(std::pair(77, 48011)); + + // Paranoia + spellList[PET_FELHUNTER].push_back(std::pair(42, 19480)); + + // Spell Lock + spellList[PET_FELHUNTER].push_back(std::pair(36, 19244)); + spellList[PET_FELHUNTER].push_back(std::pair(52, 19647)); + + // Tainted Blood + spellList[PET_FELHUNTER].push_back(std::pair(32, 19478)); + spellList[PET_FELHUNTER].push_back(std::pair(40, 19655)); + spellList[PET_FELHUNTER].push_back(std::pair(48, 19656)); + spellList[PET_FELHUNTER].push_back(std::pair(56, 19660)); + spellList[PET_FELHUNTER].push_back(std::pair(64, 27280)); + } + + // Voidwalker + { + // Consume Shadows + spellList[PET_VOIDWALKER].push_back(std::pair(18, 17767)); + spellList[PET_VOIDWALKER].push_back(std::pair(26, 17850)); + spellList[PET_VOIDWALKER].push_back(std::pair(34, 17851)); + spellList[PET_VOIDWALKER].push_back(std::pair(42, 17852)); + spellList[PET_VOIDWALKER].push_back(std::pair(50, 17853)); + spellList[PET_VOIDWALKER].push_back(std::pair(58, 17854)); + spellList[PET_VOIDWALKER].push_back(std::pair(66, 27272)); + spellList[PET_VOIDWALKER].push_back(std::pair(73, 47987)); + spellList[PET_VOIDWALKER].push_back(std::pair(78, 47988)); + + // Sacrifice + spellList[PET_VOIDWALKER].push_back(std::pair(16, 7812)); + spellList[PET_VOIDWALKER].push_back(std::pair(24, 19438)); + spellList[PET_VOIDWALKER].push_back(std::pair(32, 19440)); + spellList[PET_VOIDWALKER].push_back(std::pair(40, 19441)); + spellList[PET_VOIDWALKER].push_back(std::pair(48, 19442)); + spellList[PET_VOIDWALKER].push_back(std::pair(56, 19443)); + spellList[PET_VOIDWALKER].push_back(std::pair(64, 27273)); + spellList[PET_VOIDWALKER].push_back(std::pair(72, 47985)); + spellList[PET_VOIDWALKER].push_back(std::pair(79, 47986)); + + // Suffering + spellList[PET_VOIDWALKER].push_back(std::pair(24, 17735)); + spellList[PET_VOIDWALKER].push_back(std::pair(36, 17750)); + spellList[PET_VOIDWALKER].push_back(std::pair(48, 17751)); + spellList[PET_VOIDWALKER].push_back(std::pair(60, 17752)); + spellList[PET_VOIDWALKER].push_back(std::pair(63, 27271)); + spellList[PET_VOIDWALKER].push_back(std::pair(69, 33701)); + spellList[PET_VOIDWALKER].push_back(std::pair(75, 47989)); + spellList[PET_VOIDWALKER].push_back(std::pair(80, 47990)); + + // Torment + spellList[PET_VOIDWALKER].push_back(std::pair(10, 3716)); + spellList[PET_VOIDWALKER].push_back(std::pair(20, 7809)); + spellList[PET_VOIDWALKER].push_back(std::pair(30, 7810)); + spellList[PET_VOIDWALKER].push_back(std::pair(40, 7811)); + spellList[PET_VOIDWALKER].push_back(std::pair(50, 11774)); + spellList[PET_VOIDWALKER].push_back(std::pair(60, 11775)); + spellList[PET_VOIDWALKER].push_back(std::pair(70, 27270)); + spellList[PET_VOIDWALKER].push_back(std::pair(80, 47984)); + } + + // Succubus + { + // Lash of Pain + spellList[PET_SUCCUBUS].push_back(std::pair(20, 7814)); + spellList[PET_SUCCUBUS].push_back(std::pair(28, 7815)); + spellList[PET_SUCCUBUS].push_back(std::pair(36, 7816)); + spellList[PET_SUCCUBUS].push_back(std::pair(44, 11778)); + spellList[PET_SUCCUBUS].push_back(std::pair(52, 11779)); + spellList[PET_SUCCUBUS].push_back(std::pair(60, 11780)); + spellList[PET_SUCCUBUS].push_back(std::pair(68, 27274)); + spellList[PET_SUCCUBUS].push_back(std::pair(74, 47991)); + spellList[PET_SUCCUBUS].push_back(std::pair(80, 47992)); + + // Lesser Invisibility + spellList[PET_SUCCUBUS].push_back(std::pair(32, 7870)); + + // Seduction + spellList[PET_SUCCUBUS].push_back(std::pair(26, 6358)); + + // Soothing Kiss + spellList[PET_SUCCUBUS].push_back(std::pair(22, 6360)); + spellList[PET_SUCCUBUS].push_back(std::pair(34, 7813)); + spellList[PET_SUCCUBUS].push_back(std::pair(46, 11784)); + spellList[PET_SUCCUBUS].push_back(std::pair(58, 11785)); + spellList[PET_SUCCUBUS].push_back(std::pair(70, 27275)); + } + + // Felguard + { + // Anguish + spellList[PET_FELGUARD].push_back(std::pair(50, 33698)); + spellList[PET_FELGUARD].push_back(std::pair(60, 33699)); + spellList[PET_FELGUARD].push_back(std::pair(69, 33700)); + spellList[PET_FELGUARD].push_back(std::pair(78, 47993)); + + // Avoidance + spellList[PET_FELGUARD].push_back(std::pair(60, 32233)); + + // Cleave + spellList[PET_FELGUARD].push_back(std::pair(50, 30213)); + spellList[PET_FELGUARD].push_back(std::pair(60, 30219)); + spellList[PET_FELGUARD].push_back(std::pair(68, 30223)); + spellList[PET_FELGUARD].push_back(std::pair(76, 47994)); + + // Demonic Frenzy + spellList[PET_FELGUARD].push_back(std::pair(56, 32850)); + + // Intercept + spellList[PET_FELGUARD].push_back(std::pair(52, 30151)); + spellList[PET_FELGUARD].push_back(std::pair(61, 30194)); + spellList[PET_FELGUARD].push_back(std::pair(69, 30198)); + spellList[PET_FELGUARD].push_back(std::pair(79, 47996)); + } + + // Learn the appropriate spells by level and type + const auto& petSpellListItr = spellList.find(pet->GetEntry()); + if (petSpellListItr != spellList.end()) + { + const auto& petSpellList = petSpellListItr->second; + for (const auto& pair : petSpellListItr->second) + { + const uint32& levelRequired = pair.first; + const uint32& spellID = pair.second; + + if (pet->GetLevel() >= levelRequired) + { + pet->learnSpell(spellID); + } + } + } + } +#endif + } +} + void PlayerbotFactory::ClearSkills() { for (int i = 0; i < sizeof(tradeSkills) / sizeof(uint32); ++i) diff --git a/playerbot/PlayerbotFactory.h b/playerbot/PlayerbotFactory.h index e0e4d3e24..a7f096a9f 100644 --- a/playerbot/PlayerbotFactory.h +++ b/playerbot/PlayerbotFactory.h @@ -64,6 +64,8 @@ class PlayerbotFactory void AddConsumes() { return AddConsumables(); } void AddFood() { return InitFood(); } void InitAmmo(); + void InitPet(); + void InitPetSpells(); private: void Prepare(); @@ -85,7 +87,6 @@ class PlayerbotFactory void InitTalentsTree(bool incremental); void InitTalents(uint32 specNo); void InitQuests(list& questMap); - void InitPet(); void InitTaxiNodes(); void ClearInventory(); void ClearAllItems(); diff --git a/playerbot/PlayerbotMgr.cpp b/playerbot/PlayerbotMgr.cpp index 15fe16f5e..37a2b2dbe 100644 --- a/playerbot/PlayerbotMgr.cpp +++ b/playerbot/PlayerbotMgr.cpp @@ -594,6 +594,13 @@ string PlayerbotHolder::ProcessBotCommand(string cmd, ObjectGuid guid, ObjectGui factory.InitAmmo(); return "ok"; } + else if (cmd == "pet") + { + PlayerbotFactory factory(bot, master->GetLevel(), ITEM_QUALITY_LEGENDARY); + factory.InitPet(); + factory.InitPetSpells(); + return "ok"; + } } if (cmd == "levelup" || cmd == "level") diff --git a/playerbot/strategy/actions/ActionContext.h b/playerbot/strategy/actions/ActionContext.h index 34cb55b24..d5a03226b 100644 --- a/playerbot/strategy/actions/ActionContext.h +++ b/playerbot/strategy/actions/ActionContext.h @@ -193,6 +193,7 @@ namespace ai creators["use trinket"] = &ActionContext::use_trinket; creators["reset"] = &ActionContext::reset; creators["interrupt current spell"] = &ActionContext::interrupt_current_spell; + creators["initialize pet"] = &ActionContext::initialize_pet; // item helpers creators["goblin sapper"] = &ActionContext::goblin_sapper; @@ -369,6 +370,7 @@ namespace ai static Action* flee_with_pet(PlayerbotAI* ai) { return new FleeWithPetAction(ai); } static Action* wait_for_attack_keep_safe_distance(PlayerbotAI* ai) { return new WaitForAttackKeepSafeDistanceAction(ai); } static Action* flee(PlayerbotAI* ai) { return new FleeAction(ai); } + static Action* initialize_pet(PlayerbotAI* ai) { return new InitializePetAction(ai); } //racials static Action* war_stomp(PlayerbotAI* ai) { return new CastWarStompAction(ai); } diff --git a/playerbot/strategy/actions/GenericActions.cpp b/playerbot/strategy/actions/GenericActions.cpp index 1cc093741..6e12c747c 100644 --- a/playerbot/strategy/actions/GenericActions.cpp +++ b/playerbot/strategy/actions/GenericActions.cpp @@ -1,6 +1,7 @@ #include "botpch.h" #include "../../playerbot.h" #include "GenericActions.h" +#include "PlayerbotFactory.h" using namespace ai; @@ -101,4 +102,220 @@ bool UpdateStrategyDependenciesAction::isUseful() } return !strategiesToAdd.empty() || !strategiesToRemove.empty(); -} \ No newline at end of file +} + +bool InitializePetAction::Execute(Event& event) +{ + PlayerbotFactory factory(bot, bot->GetLevel(), ITEM_QUALITY_LEGENDARY); + factory.InitPet(); + factory.InitPetSpells(); + return true; +} + +bool InitializePetAction::isUseful() +{ + // Only for random bots with item cheats enabled + if (ai->HasCheat(BotCheatMask::item) && sPlayerbotAIConfig.IsInRandomAccountList(bot->GetSession()->GetAccountId())) + { + if (bot->getClass() == CLASS_HUNTER) + { + return !bot->GetPet(); + } + else if (bot->getClass() == CLASS_WARLOCK) + { + // Only initialize if warlock has the pet summoned + Pet* pet = bot->GetPet(); + if (pet) + { + constexpr uint32 PET_IMP = 416; + constexpr uint32 PET_FELHUNTER = 417; + constexpr uint32 PET_VOIDWALKER = 1860; + constexpr uint32 PET_SUCCUBUS = 1863; + constexpr uint32 PET_FELGUARD = 17252; + + // pet type pet level pet spell id + std::map>> spellList; + + // Imp spells + { + // Blood Pact + spellList[PET_IMP].push_back(std::pair(4, 6307)); + spellList[PET_IMP].push_back(std::pair(14, 7804)); + spellList[PET_IMP].push_back(std::pair(26, 7805)); + spellList[PET_IMP].push_back(std::pair(38, 11766)); + spellList[PET_IMP].push_back(std::pair(50, 11767)); + spellList[PET_IMP].push_back(std::pair(62, 27268)); + spellList[PET_IMP].push_back(std::pair(74, 47982)); + + // Fire Shield + spellList[PET_IMP].push_back(std::pair(14, 2947)); + spellList[PET_IMP].push_back(std::pair(24, 8316)); + spellList[PET_IMP].push_back(std::pair(34, 8317)); + spellList[PET_IMP].push_back(std::pair(44, 11770)); + spellList[PET_IMP].push_back(std::pair(54, 11771)); + spellList[PET_IMP].push_back(std::pair(64, 27269)); + spellList[PET_IMP].push_back(std::pair(76, 47983)); + + // Firebolt + spellList[PET_IMP].push_back(std::pair(1, 3110)); + spellList[PET_IMP].push_back(std::pair(8, 7799)); + spellList[PET_IMP].push_back(std::pair(18, 7800)); + spellList[PET_IMP].push_back(std::pair(28, 7801)); + spellList[PET_IMP].push_back(std::pair(38, 7802)); + spellList[PET_IMP].push_back(std::pair(48, 11762)); + spellList[PET_IMP].push_back(std::pair(58, 11763)); + spellList[PET_IMP].push_back(std::pair(68, 27267)); + spellList[PET_IMP].push_back(std::pair(78, 47964)); + + // Phase Shift + spellList[PET_IMP].push_back(std::pair(12, 4511)); + } + + // Felhunter spells + { + // Devour Magic + spellList[PET_FELHUNTER].push_back(std::pair(30, 19505)); + spellList[PET_FELHUNTER].push_back(std::pair(38, 19731)); + spellList[PET_FELHUNTER].push_back(std::pair(46, 19734)); + spellList[PET_FELHUNTER].push_back(std::pair(54, 19736)); + spellList[PET_FELHUNTER].push_back(std::pair(62, 27276)); + spellList[PET_FELHUNTER].push_back(std::pair(70, 27277)); + spellList[PET_FELHUNTER].push_back(std::pair(77, 48011)); + + // Paranoia + spellList[PET_FELHUNTER].push_back(std::pair(42, 19480)); + + // Spell Lock + spellList[PET_FELHUNTER].push_back(std::pair(36, 19244)); + spellList[PET_FELHUNTER].push_back(std::pair(52, 19647)); + + // Tainted Blood + spellList[PET_FELHUNTER].push_back(std::pair(32, 19478)); + spellList[PET_FELHUNTER].push_back(std::pair(40, 19655)); + spellList[PET_FELHUNTER].push_back(std::pair(48, 19656)); + spellList[PET_FELHUNTER].push_back(std::pair(56, 19660)); + spellList[PET_FELHUNTER].push_back(std::pair(64, 27280)); + } + + // Voidwalker + { + // Consume Shadows + spellList[PET_VOIDWALKER].push_back(std::pair(18, 17767)); + spellList[PET_VOIDWALKER].push_back(std::pair(26, 17850)); + spellList[PET_VOIDWALKER].push_back(std::pair(34, 17851)); + spellList[PET_VOIDWALKER].push_back(std::pair(42, 17852)); + spellList[PET_VOIDWALKER].push_back(std::pair(50, 17853)); + spellList[PET_VOIDWALKER].push_back(std::pair(58, 17854)); + spellList[PET_VOIDWALKER].push_back(std::pair(66, 27272)); + spellList[PET_VOIDWALKER].push_back(std::pair(73, 47987)); + spellList[PET_VOIDWALKER].push_back(std::pair(78, 47988)); + + // Sacrifice + spellList[PET_VOIDWALKER].push_back(std::pair(16, 7812)); + spellList[PET_VOIDWALKER].push_back(std::pair(24, 19438)); + spellList[PET_VOIDWALKER].push_back(std::pair(32, 19440)); + spellList[PET_VOIDWALKER].push_back(std::pair(40, 19441)); + spellList[PET_VOIDWALKER].push_back(std::pair(48, 19442)); + spellList[PET_VOIDWALKER].push_back(std::pair(56, 19443)); + spellList[PET_VOIDWALKER].push_back(std::pair(64, 27273)); + spellList[PET_VOIDWALKER].push_back(std::pair(72, 47985)); + spellList[PET_VOIDWALKER].push_back(std::pair(79, 47986)); + + // Suffering + spellList[PET_VOIDWALKER].push_back(std::pair(24, 17735)); + spellList[PET_VOIDWALKER].push_back(std::pair(36, 17750)); + spellList[PET_VOIDWALKER].push_back(std::pair(48, 17751)); + spellList[PET_VOIDWALKER].push_back(std::pair(60, 17752)); + spellList[PET_VOIDWALKER].push_back(std::pair(63, 27271)); + spellList[PET_VOIDWALKER].push_back(std::pair(69, 33701)); + spellList[PET_VOIDWALKER].push_back(std::pair(75, 47989)); + spellList[PET_VOIDWALKER].push_back(std::pair(80, 47990)); + + // Torment + spellList[PET_VOIDWALKER].push_back(std::pair(10, 3716)); + spellList[PET_VOIDWALKER].push_back(std::pair(20, 7809)); + spellList[PET_VOIDWALKER].push_back(std::pair(30, 7810)); + spellList[PET_VOIDWALKER].push_back(std::pair(40, 7811)); + spellList[PET_VOIDWALKER].push_back(std::pair(50, 11774)); + spellList[PET_VOIDWALKER].push_back(std::pair(60, 11775)); + spellList[PET_VOIDWALKER].push_back(std::pair(70, 27270)); + spellList[PET_VOIDWALKER].push_back(std::pair(80, 47984)); + } + + // Succubus + { + // Lash of Pain + spellList[PET_SUCCUBUS].push_back(std::pair(20, 7814)); + spellList[PET_SUCCUBUS].push_back(std::pair(28, 7815)); + spellList[PET_SUCCUBUS].push_back(std::pair(36, 7816)); + spellList[PET_SUCCUBUS].push_back(std::pair(44, 11778)); + spellList[PET_SUCCUBUS].push_back(std::pair(52, 11779)); + spellList[PET_SUCCUBUS].push_back(std::pair(60, 11780)); + spellList[PET_SUCCUBUS].push_back(std::pair(68, 27274)); + spellList[PET_SUCCUBUS].push_back(std::pair(74, 47991)); + spellList[PET_SUCCUBUS].push_back(std::pair(80, 47992)); + + // Lesser Invisibility + spellList[PET_SUCCUBUS].push_back(std::pair(32, 7870)); + + // Seduction + spellList[PET_SUCCUBUS].push_back(std::pair(26, 6358)); + + // Soothing Kiss + spellList[PET_SUCCUBUS].push_back(std::pair(22, 6360)); + spellList[PET_SUCCUBUS].push_back(std::pair(34, 7813)); + spellList[PET_SUCCUBUS].push_back(std::pair(46, 11784)); + spellList[PET_SUCCUBUS].push_back(std::pair(58, 11785)); + spellList[PET_SUCCUBUS].push_back(std::pair(70, 27275)); + } + + // Felguard + { + // Anguish + spellList[PET_FELGUARD].push_back(std::pair(50, 33698)); + spellList[PET_FELGUARD].push_back(std::pair(60, 33699)); + spellList[PET_FELGUARD].push_back(std::pair(69, 33700)); + spellList[PET_FELGUARD].push_back(std::pair(78, 47993)); + + // Avoidance + spellList[PET_FELGUARD].push_back(std::pair(60, 32233)); + + // Cleave + spellList[PET_FELGUARD].push_back(std::pair(50, 30213)); + spellList[PET_FELGUARD].push_back(std::pair(60, 30219)); + spellList[PET_FELGUARD].push_back(std::pair(68, 30223)); + spellList[PET_FELGUARD].push_back(std::pair(76, 47994)); + + // Demonic Frenzy + spellList[PET_FELGUARD].push_back(std::pair(56, 32850)); + + // Intercept + spellList[PET_FELGUARD].push_back(std::pair(52, 30151)); + spellList[PET_FELGUARD].push_back(std::pair(61, 30194)); + spellList[PET_FELGUARD].push_back(std::pair(69, 30198)); + spellList[PET_FELGUARD].push_back(std::pair(79, 47996)); + } + + // Get the appropriate spell list by level and type + const auto& petSpellListItr = spellList.find(pet->GetEntry()); + if (petSpellListItr != spellList.end()) + { + const auto& petSpellList = petSpellListItr->second; + for (const auto& pair : petSpellListItr->second) + { + const uint32& levelRequired = pair.first; + const uint32& spellID = pair.second; + + // Check if the pet is missing the spells for it's current level + if (pet->GetLevel() >= levelRequired && !pet->HasSpell(spellID)) + { + return true; + } + } + } + } + } + } + + return false; +} diff --git a/playerbot/strategy/actions/GenericActions.h b/playerbot/strategy/actions/GenericActions.h index 239a9f148..57d960b30 100644 --- a/playerbot/strategy/actions/GenericActions.h +++ b/playerbot/strategy/actions/GenericActions.h @@ -135,4 +135,12 @@ namespace ai public: RemoveGreaterBlessingOfSalvationAction(PlayerbotAI* ai) : RemoveAuraAction(ai, "greater blessing of salvation") {} }; + + class InitializePetAction : public Action + { + public: + InitializePetAction(PlayerbotAI* ai) : Action(ai, "initialize pet") {} + bool Execute(Event& event) override; + bool isUseful() override; + }; } diff --git a/playerbot/strategy/hunter/HunterStrategy.cpp b/playerbot/strategy/hunter/HunterStrategy.cpp index 51e40f0ea..f81b3a647 100644 --- a/playerbot/strategy/hunter/HunterStrategy.cpp +++ b/playerbot/strategy/hunter/HunterStrategy.cpp @@ -96,7 +96,7 @@ void HunterStrategy::InitNonCombatTriggers(std::list& triggers) triggers.push_back(new TriggerNode( "stealthed nearby", - NextAction::array(0, new NextAction("flare", ACTION_NORMAL + 1), NULL))); + NextAction::array(0, new NextAction("flare", ACTION_NORMAL + 2), NULL))); triggers.push_back(new TriggerNode( "no pet", @@ -114,6 +114,10 @@ void HunterStrategy::InitNonCombatTriggers(std::list& triggers) "hunters pet dead", NextAction::array(0, new NextAction("revive pet", ACTION_NORMAL + 1), NULL))); + triggers.push_back(new TriggerNode( + "often", + NextAction::array(0, new NextAction("initialize pet", ACTION_NORMAL + 1), NULL))); + triggers.push_back(new TriggerNode( "no ammo", NextAction::array(0, new NextAction("say::no ammo", ACTION_NORMAL), NULL))); diff --git a/playerbot/strategy/warlock/WarlockStrategy.cpp b/playerbot/strategy/warlock/WarlockStrategy.cpp index 3d90bfbdb..f9423cc80 100644 --- a/playerbot/strategy/warlock/WarlockStrategy.cpp +++ b/playerbot/strategy/warlock/WarlockStrategy.cpp @@ -63,6 +63,10 @@ void WarlockStrategy::InitNonCombatTriggers(std::list& triggers) { ClassStrategy::InitNonCombatTriggers(triggers); + triggers.push_back(new TriggerNode( + "often", + NextAction::array(0, new NextAction("initialize pet", ACTION_NORMAL + 1), NULL))); + triggers.push_back(new TriggerNode( "no healthstone", NextAction::array(0, new NextAction("create healthstone", ACTION_NORMAL), NULL)));