diff --git a/zone/bot.cpp b/zone/bot.cpp index b0bb7ca6d..acfc9bf4f 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -10599,6 +10599,8 @@ BotSpell Bot::GetSpellByHealType(uint16 spell_type, Mob* tar) { return GetBestBotSpellForHealOverTime(this, tar, spell_type); case BotSpellTypes::GroupHoTHeals: return GetBestBotSpellForGroupHealOverTime(this, tar, spell_type); + default: + return BotSpell(); // Return an empty BotSpell if no valid spell type is found } } @@ -10650,7 +10652,7 @@ int Bot::GetDefaultSetting(uint16 setting_category, uint16 setting_type, uint8 s case BotSettingCategories::SpellTypeAnnounceCast: return GetDefaultSpellTypeAnnounceCast(setting_type, stance); default: - break; + return 0; // Default return value for unrecognized categories } } @@ -10689,7 +10691,7 @@ int Bot::GetSetting(uint16 setting_category, uint16 setting_type) { case BotSettingCategories::SpellTypeAnnounceCast: return GetSpellTypeAnnounceCast(setting_type); default: - break; + return 0; // Default return value for unrecognized categories } } diff --git a/zone/client_bot.cpp b/zone/client_bot.cpp index 1a420b216..7b5b229d8 100644 --- a/zone/client_bot.cpp +++ b/zone/client_bot.cpp @@ -256,6 +256,8 @@ int Client::GetDefaultBotSettings(uint8 setting_type, uint16 bot_setting) { return GetDefaultSpellTypeMinThreshold(bot_setting); case BotSettingCategories::SpellMaxThreshold: return GetDefaultSpellTypeMaxThreshold(bot_setting); + default: + return 0; // default return for any unsupported setting type } } @@ -269,6 +271,8 @@ int Client::GetBotSetting(uint8 setting_type, uint16 bot_setting) { return GetSpellTypeMinThreshold(bot_setting); case BotSettingCategories::SpellMaxThreshold: return GetSpellTypeMaxThreshold(bot_setting); + default: + return 0; // default return for any unsupported setting type } }