[Cleanup] Bot RaidGroupSay (#4653)

This commit is contained in:
nytmyr
2025-02-07 13:06:31 -06:00
committed by GitHub
parent 41009aa19b
commit 60ba76b39c
15 changed files with 38 additions and 90 deletions
+1 -1
View File
@@ -1133,7 +1133,7 @@ void bot_command_spawn(Client *c, const Seperator *sep)
}
if (!silent_tell && c->GetBotOption(Client::booSpawnMessageSay)) {
Bot::RaidGroupSay(my_bot, bot_spawn_message[message_index].c_str());
my_bot->RaidGroupSay(bot_spawn_message[message_index].c_str());
}
else if (!silent_tell && c->GetBotOption(Client::booSpawnMessageTell)) {
my_bot->OwnerMessage(bot_spawn_message[message_index]);
-1
View File
@@ -502,7 +502,6 @@ void bot_command_cast(Client* c, const Seperator* sep)
if (IsBotSpellTypeDetrimental(spell_type) && !bot_iter->IsAttackAllowed(new_tar)) {
bot_iter->RaidGroupSay(
bot_iter,
fmt::format(
"I cannot attack [{}].",
new_tar->GetCleanName()
+3 -6
View File
@@ -171,8 +171,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
}
}
Bot::RaidGroupSay(
bot_iter,
bot_iter->RaidGroupSay(
fmt::format(
"I can port you to {}.",
Saylink::Silent(
@@ -207,8 +206,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
}
if (bot_iter->IsCommandedSpell() && bot_iter->IsCasting()) {
Bot::RaidGroupSay(
bot_iter,
bot_iter->RaidGroupSay(
fmt::format(
"Interrupting {}. I have been commanded to try to cast a [{}] spell, {} on {}.",
bot_iter->CastingSpellID() ? spells[bot_iter->CastingSpellID()].name : "my spell",
@@ -229,8 +227,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
bot_iter->SetCastedSpellType(BotSpellTypes::Teleport);
}
Bot::RaidGroupSay(
bot_iter,
bot_iter->RaidGroupSay(
fmt::format(
"Casting {} [{}] on {}.",
GetSpellName(itr->SpellId),
+1 -2
View File
@@ -47,8 +47,7 @@ void bot_command_guard(Client *c, const Seperator *sep)
}
if (sbl.size() == 1) {
Bot::RaidGroupSay(
sbl.front(),
sbl.front()->RaidGroupSay(
fmt::format(
"{}uarding this position.",
clear ? "No longer g" : "G"
+1 -2
View File
@@ -47,8 +47,7 @@ void bot_command_hold(Client *c, const Seperator *sep)
}
if (sbl.size() == 1) {
Bot::RaidGroupSay(
sbl.front(),
sbl.front()->RaidGroupSay(
fmt::format(
"{}olding my attacks.",
clear ? "No longer h" : "H"
+2 -2
View File
@@ -74,7 +74,7 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
if (bot_iter->IsBotCharmer()) {
bot_iter->SetBotCharmer(false);
if (sbl.size() == 1)
Bot::RaidGroupSay(bot_iter, "Using a summoned pet");
bot_iter->RaidGroupSay("Using a summoned pet");
++summoned_pet;
continue;
}
@@ -86,7 +86,7 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
}
bot_iter->SetBotCharmer(true);
if (sbl.size() == 1)
Bot::RaidGroupSay(bot_iter, "Available for Charming");
bot_iter->RaidGroupSay("Available for Charming");
++charmed_pet;
}
+2 -2
View File
@@ -24,7 +24,7 @@ void bot_command_pick_lock(Client *c, const Seperator *sep)
Bot* my_bot = sbl.front();
my_bot->InterruptSpell();
Bot::RaidGroupSay(my_bot, "Attempting to pick the lock.");
my_bot->RaidGroupSay("Attempting to pick the lock.");
std::list<Doors*> door_list;
entity_list.GetDoorsList(door_list);
@@ -51,7 +51,7 @@ void bot_command_pick_lock(Client *c, const Seperator *sep)
++open_count;
}
else {
Bot::RaidGroupSay(my_bot, "I am not skilled enough for this lock.");
my_bot->RaidGroupSay("I am not skilled enough for this lock.");
}
}
c->Message(Chat::White, "%i door%s attempted - %i door%s successful", door_count, ((door_count != 1) ? ("s") : ("")), open_count, ((open_count != 1) ? ("s") : ("")));
+2 -4
View File
@@ -130,8 +130,7 @@ void bot_command_taunt(Client* c, const Seperator* sep)
bot_iter->SetTaunting(taunt_state);
Bot::RaidGroupSay(
bot_iter,
bot_iter->RaidGroupSay(
fmt::format(
"I am {} taunting.",
bot_iter->IsTaunting() ? "now" : "no longer"
@@ -154,8 +153,7 @@ void bot_command_taunt(Client* c, const Seperator* sep)
bot_iter->GetPet()->CastToNPC()->SetTaunting(taunt_state);
Bot::RaidGroupSay(
bot_iter,
bot_iter->RaidGroupSay(
fmt::format(
"My Pet is {} taunting.",
bot_iter->GetPet()->CastToNPC()->IsTaunting() ? "now" : "no longer"
+1 -1
View File
@@ -67,6 +67,6 @@ void bot_command_track(Client *c, const Seperator *sep)
}
my_bot->InterruptSpell();
Bot::RaidGroupSay(my_bot, tracking_msg.c_str());
my_bot->RaidGroupSay(tracking_msg.c_str());
entity_list.ShowSpawnWindow(c, (c->GetLevel() * base_distance), track_named);
}