From 2766d553c765969fd69d0c39be66f5f27b974886 Mon Sep 17 00:00:00 2001 From: SaW Date: Wed, 26 Feb 2025 13:32:26 +0100 Subject: [PATCH] Maintenance command to retain defined special spells (#1024) fixes a bug that caused the maintenance command to have bots lose the special spells --- src/factory/PlayerbotFactory.h | 2 +- src/strategy/actions/TrainerAction.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/factory/PlayerbotFactory.h b/src/factory/PlayerbotFactory.h index 26e75811..c17d2ab4 100644 --- a/src/factory/PlayerbotFactory.h +++ b/src/factory/PlayerbotFactory.h @@ -122,6 +122,7 @@ public: static void InitTalentsByParsedSpecLink(Player* bot, std::vector> parsedSpecLink, bool reset); void InitAvailableSpells(); void InitClassSpells(); + void InitSpecialSpells(); void InitEquipment(bool incremental, bool second_chance = false); void InitPet(); void InitAmmo(); @@ -149,7 +150,6 @@ private: void InitSpells(); void ClearSpells(); void ClearSkills(); - void InitSpecialSpells(); void InitTalents(uint32 specNo); void InitTalentsByTemplate(uint32 specNo); void InitQuests(std::list& questMap); diff --git a/src/strategy/actions/TrainerAction.cpp b/src/strategy/actions/TrainerAction.cpp index b0245d83..5124ca72 100644 --- a/src/strategy/actions/TrainerAction.cpp +++ b/src/strategy/actions/TrainerAction.cpp @@ -174,6 +174,7 @@ bool MaintenanceAction::Execute(Event event) factory.InitClassSpells(); factory.InitAvailableSpells(); factory.InitSkills(); + factory.InitSpecialSpells(); factory.InitMounts(); factory.InitGlyphs(true); if (bot->GetLevel() >= sPlayerbotAIConfig->minEnchantingBotLevel) @@ -226,4 +227,4 @@ bool AutoGearAction::Execute(Event event) } bot->DurabilityRepairAll(false, 1.0f, false); return true; -} \ No newline at end of file +}