[Bots] Correct camp count on ^camp (#4650)

* Correct camp count on ^camp

* Update bot.cpp

---------

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
nytmyr 2025-02-06 03:40:09 -06:00 committed by GitHub
parent 0dde51f518
commit 1650efa787
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -56,15 +56,12 @@ void bot_command_camp(Client *c, const Seperator *sep)
return;
}
uint16 camp_count;
for (auto bot_iter : sbl) {
bot_iter->Camp();
++camp_count;
}
if (camp_count) {
c->Message(Chat::White, "%i of your bots have been camped.", camp_count);
if (!sbl.empty()) {
c->Message(Chat::White, fmt::format("{} of your bots have been camped.", sbl.size()).c_str());
}
}