From 90984c3215dc9d8eca73fce79ac22cd16d0ce0b5 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 3 Apr 2023 17:03:56 -0400 Subject: [PATCH] [Cleanup] Remove unnecessary spell_list validation check in botspellsai.cpp (#3244) # Notes - We check if valid above, no need to do it again. --- zone/botspellsai.cpp | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index df4bda7c5..9479378e2 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -3050,23 +3050,16 @@ bool Bot::AI_AddBotSpells(uint32 bot_spell_id) { GetLevel() ); - if (spell_list) { - debug_msg.append( - fmt::format( - " (found, {})", - spell_list->entries.size() - ) - ); + debug_msg.append( + fmt::format( + " (found, {})", + spell_list->entries.size() + ) + ); - LogAI("[{}]", debug_msg); - for (const auto &iter : spell_list->entries) { - LogAIDetail("([{}]) [{}]", iter.spellid, spells[iter.spellid].name); - } - } - else - { - debug_msg.append(" (not found)"); - LogAI("[{}]", debug_msg); + LogAI("[{}]", debug_msg); + for (const auto &iter: spell_list->entries) { + LogAIDetail("([{}]) [{}]", iter.spellid, spells[iter.spellid].name); } LogAI("fin (spell list)");