Revert auto learn spell

This commit is contained in:
Yunfan Li
2024-08-14 17:25:13 +08:00
parent be4deb62cf
commit 6d11df0209

View File

@@ -34,10 +34,12 @@ bool AutoLearnSpellAction::Execute(Event event)
void AutoLearnSpellAction::LearnSpells(std::ostringstream* out) void AutoLearnSpellAction::LearnSpells(std::ostringstream* out)
{ {
BroadcastHelper::BroadcastLevelup(botAI, bot); BroadcastHelper::BroadcastLevelup(botAI, bot);
if (sPlayerbotAIConfig->autoLearnTrainerSpells) if (sPlayerbotAIConfig->autoLearnTrainerSpells &&
sRandomPlayerbotMgr->IsRandomBot(bot))
LearnTrainerSpells(out); LearnTrainerSpells(out);
if (sPlayerbotAIConfig->autoLearnQuestSpells) if (sPlayerbotAIConfig->autoLearnTrainerSpells &&
sRandomPlayerbotMgr->IsRandomBot(bot))
LearnQuestSpells(out); LearnQuestSpells(out);
} }