[Bots] Cleanup Spell Settings Commands (#2607)

* [Bots] Cleanup Spell Settings Commands

* Update Bot DB version

* typo
This commit is contained in:
Aeadoin
2022-12-03 19:49:45 -05:00
committed by GitHub
parent 61b91d92c3
commit 80fffb57b1
8 changed files with 122 additions and 28 deletions
+2 -2
View File
@@ -10696,7 +10696,7 @@ void Bot::ListBotSpells(uint8 min_level)
return;
}
if (AIBot_spells.empty()) {
if (AIBot_spells.empty() && AIBot_spells_enforced.empty()) {
bot_owner->Message(
Chat::White,
fmt::format(
@@ -10710,7 +10710,7 @@ void Bot::ListBotSpells(uint8 min_level)
auto spell_count = 0;
auto spell_number = 1;
for (const auto& s : AIBot_spells) {
for (const auto& s : (AIBot_spells.size() > AIBot_spells_enforced.size()) ? AIBot_spells : AIBot_spells_enforced) {
auto b = bot_spell_settings.find(s.spellid);
if (b == bot_spell_settings.end() && s.minlevel >= min_level) {
bot_owner->Message(