From 6d11df020925c1c5561baaed06f38d62d3007a69 Mon Sep 17 00:00:00 2001 From: Yunfan Li Date: Wed, 14 Aug 2024 17:25:13 +0800 Subject: [PATCH] Revert auto learn spell --- src/strategy/actions/AutoLearnSpellAction.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/strategy/actions/AutoLearnSpellAction.cpp b/src/strategy/actions/AutoLearnSpellAction.cpp index 96a93161..942e49db 100644 --- a/src/strategy/actions/AutoLearnSpellAction.cpp +++ b/src/strategy/actions/AutoLearnSpellAction.cpp @@ -34,10 +34,12 @@ bool AutoLearnSpellAction::Execute(Event event) void AutoLearnSpellAction::LearnSpells(std::ostringstream* out) { BroadcastHelper::BroadcastLevelup(botAI, bot); - if (sPlayerbotAIConfig->autoLearnTrainerSpells) + if (sPlayerbotAIConfig->autoLearnTrainerSpells && + sRandomPlayerbotMgr->IsRandomBot(bot)) LearnTrainerSpells(out); - if (sPlayerbotAIConfig->autoLearnQuestSpells) + if (sPlayerbotAIConfig->autoLearnTrainerSpells && + sRandomPlayerbotMgr->IsRandomBot(bot)) LearnQuestSpells(out); }