diff --git a/zone/bot.cpp b/zone/bot.cpp index 98b8a242b..83a6dacea 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -7911,6 +7911,14 @@ void Bot::SetDefaultBotStance() { } void Bot::RaidGroupSay(Mob* speaker, const char* msg, ...) { + if ( + speaker->CastToBot()->GetTempSpellType() && + speaker->CastToBot()->GetTempSpellType() != UINT16_MAX && + !speaker->CastToBot()->GetSpellTypeAnnounceCast(speaker->CastToBot()->GetTempSpellType()) + ) { + return; + } + char buf[1000]; va_list ap; va_start(ap, msg); diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index 8eab457e0..d9e4863df 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -254,10 +254,6 @@ bool Bot::AICastSpell(Mob* tar, uint8 chance, uint16 spell_type, uint16 sub_targ SetCastedSpellType(spell_type); } - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -305,10 +301,6 @@ bool Bot::BotCastMez(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spel SetCastedSpellType(spell_type); } - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -352,10 +344,6 @@ bool Bot::BotCastCure(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spe } } - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -369,10 +357,6 @@ bool Bot::BotCastCure(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spe SetBotSpellRecastTimer(spell_type, tar, true); } - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -427,10 +411,6 @@ bool Bot::BotCastPet(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spel if (AIDoSpellCast(bot_spell.SpellIndex, tar, bot_spell.ManaCost)) { SetCastedSpellType(spell_type); - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -487,10 +467,6 @@ bool Bot::BotCastNuke(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spe if (AIDoSpellCast(s.SpellIndex, tar, s.ManaCost)) { SetCastedSpellType(spell_type); - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -509,10 +485,6 @@ bool Bot::BotCastNuke(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spe if (AIDoSpellCast(bot_spell.SpellIndex, tar, bot_spell.ManaCost)) { SetCastedSpellType(spell_type); - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -549,10 +521,6 @@ bool Bot::BotCastHeal(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spe } } - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format( @@ -570,10 +538,6 @@ bool Bot::BotCastHeal(Mob* tar, uint8 bot_class, BotSpell& bot_spell, uint16 spe } } - if (!GetSpellTypeAnnounceCast(spell_type)) { - return true; - } - RaidGroupSay( this, fmt::format(