From 5c63aacd6050b7e1aa276290429cc6b89b595fb5 Mon Sep 17 00:00:00 2001 From: NoxMax <50133316+NoxMax@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:39:24 -0600 Subject: [PATCH] Drop server initialization time message. Show number of bots set to login. (#2209) ## Pull Request Description The server initialization time on login is neither relevant to the typical user, nor is it accurate. It simply takes `maxRandomBots`, does some arbitrary multiplications and divisions on it, and declare that as the time it takes the server to load. It does not take into account any other of your server configurations nor your server capabilities. Here we exchange that message with one more relevant to the user, telling them the number of logged in bot (or set to be logged in with DisabledWithoutRealPlayer enabled). But honestly, even removing that whole snippet is a better idea than keeping the misleading message. ## Feature Evaluation - Describe the **minimum logic** required to achieve the intended behavior. - Describe the **processing cost** when this logic executes across many bots. Alternatively the whole snippet can be removed. ## How to Test the Changes Login and see the welcome messages. ## Impact Assessment - Does this change increase per-bot/per-tick processing or risk scaling poorly with thousands of bots? - [x] No, not at all - [ ] Minimal impact (**explain below**) - [ ] Moderate impact (**explain below**) - Does this change modify default bot behavior? - [x] No - [ ] Yes (**explain why**) - Does this change add new decision branches or increase maintenance complexity? - [x] No - [ ] Yes (**explain below**) ## Messages to Translate Does this change add bot messages to translate? - [x] No - [ ] Yes (**list messages in the table**) | Message key | Default message | | --------------- | ------------------ | | | | | | | ## AI Assistance Was AI assistance used while working on this change? - [x] No - [ ] Yes (**explain below**) ## Final Checklist - [x] Stability is not compromised. - [x] Performance impact is understood, tested, and acceptable. - [x] Added logic complexity is justified and explained. - [x] Documentation updated if needed (Conf comments, WiKi commands). ## Notes for Reviewers --------- Co-authored-by: Keleborn <22352763+Celandriel@users.noreply.github.com> Co-authored-by: bash Co-authored-by: Revision Co-authored-by: kadeshar --- src/Script/Playerbots.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Script/Playerbots.cpp b/src/Script/Playerbots.cpp index af28027c9..7db91eb40 100644 --- a/src/Script/Playerbots.cpp +++ b/src/Script/Playerbots.cpp @@ -112,13 +112,10 @@ public: if (sPlayerbotAIConfig.enabled || sPlayerbotAIConfig.randomBotAutologin) { - std::string roundedTime = - std::to_string(std::ceil((sPlayerbotAIConfig.maxRandomBots * 0.11 / 60) * 10) / 10.0); - roundedTime = roundedTime.substr(0, roundedTime.find('.') + 2); + std::string maxAllowedBotCount = std::to_string(sRandomPlayerbotMgr.GetMaxAllowedBotCount()); ChatHandler(player->GetSession()).SendSysMessage( - "|cff00ff00Playerbots:|r bot initialization at server startup takes about '" - + roundedTime + "' minutes."); + "|cff00ff00Playerbots:|r The server is configured with " + maxAllowedBotCount + " bots."); } } }