From bcd6f5bc066d5e8a54f2d37b7dfc54e5db0dd2d1 Mon Sep 17 00:00:00 2001 From: bash <31279994+hermensbas@users.noreply.github.com> Date: Sun, 10 Aug 2025 19:11:39 +0200 Subject: [PATCH] Removed bot freezing at startup and system message, not relevant anymore (#1519) --- src/PlayerbotAI.cpp | 13 ------------- src/PlayerbotAI.h | 1 - src/Playerbots.cpp | 4 ++-- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 09a6ef82..998310f9 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -4214,19 +4214,6 @@ bool PlayerbotAI::AllowActive(ActivityType activityType) } } - // only keep updating till initializing time has completed, - // which prevents unneeded expensive GameTime calls. - if (_isBotInitializing) - { - _isBotInitializing = GameTime::GetUptime().count() < sPlayerbotAIConfig->maxRandomBots * 0.11; - - // no activity allowed during bot initialization - if (_isBotInitializing) - { - return false; - } - } - // General exceptions if (activityType == PACKET_ACTIVITY) { diff --git a/src/PlayerbotAI.h b/src/PlayerbotAI.h index 3fa7b5b6..c7bd5e62 100644 --- a/src/PlayerbotAI.h +++ b/src/PlayerbotAI.h @@ -611,7 +611,6 @@ private: Item* FindItemInInventory(std::function checkItem) const; void HandleCommands(); void HandleCommand(uint32 type, const std::string& text, Player& fromPlayer, const uint32 lang = LANG_UNIVERSAL); - bool _isBotInitializing = false; protected: Player* bot; diff --git a/src/Playerbots.cpp b/src/Playerbots.cpp index 76b32efa..13b04e0e 100644 --- a/src/Playerbots.cpp +++ b/src/Playerbots.cpp @@ -108,7 +108,7 @@ public: "|cffcccccchttps://github.com/liyunfan1223/mod-playerbots|r"); } - if (sPlayerbotAIConfig->enabled || sPlayerbotAIConfig->randomBotAutologin) + /*if (sPlayerbotAIConfig->enabled || sPlayerbotAIConfig->randomBotAutologin) { std::string roundedTime = std::to_string(std::ceil((sPlayerbotAIConfig->maxRandomBots * 0.11 / 60) * 10) / 10.0); @@ -117,7 +117,7 @@ public: ChatHandler(player->GetSession()).SendSysMessage( "|cff00ff00Playerbots:|r bot initialization at server startup takes about '" + roundedTime + "' minutes."); - } + }*/ } }