From 470392021b091145f5275cac07d692c2edba0370 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 3 Apr 2023 17:04:51 -0400 Subject: [PATCH] [Cleanup] Remove unnecessary setting of spell_type_index in Bot::GetChanceToCastBySpellType() (#3243) # Notes - The default is already `SPELL_TYPE_COUNT`, no need to set it again. --- zone/botspellsai.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index 9479378e2..228f49aa7 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -2993,9 +2993,9 @@ uint8 Bot::GetChanceToCastBySpellType(uint32 spellType) spell_type_index = spellTypeIndexPreCombatBuffSong; break; default: - spell_type_index = SPELL_TYPE_COUNT; break; } + if (spell_type_index >= SPELL_TYPE_COUNT) return 0;