mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Use GetTempSpellType() for announce check in RaidGroupSay
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user